little breakthrought im QML Layouts
This commit is contained in:
@@ -117,7 +117,7 @@ void XQMainWindow::initMainWindow()
|
||||
|
||||
// #2. load demo data
|
||||
loadDocument( c_DocumentFileName1 );
|
||||
//loadDocumentQML( c_DocumentFileName2 );
|
||||
loadDocumentQML( c_DocumentFileName2 );
|
||||
|
||||
qDebug() << " --- all here: " << XQNode::s_Count;
|
||||
|
||||
@@ -131,6 +131,9 @@ void XQMainWindow::initMainWindow()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//! slot für zentrales undo
|
||||
|
||||
void XQMainWindow::onUndo()
|
||||
@@ -319,8 +322,6 @@ void XQMainWindow::loadDocumentQML( const QString& fileName )
|
||||
// das als Namen verwendet wird.
|
||||
const QString& fName = contentRoot->friendly_name();
|
||||
|
||||
QStandardItemModel* model = createModel();
|
||||
|
||||
// Ein neues Child-Model erzeugen
|
||||
XQChildModel* childModel = new XQChildModel(this);
|
||||
// die Modelstruktur anlegen
|
||||
@@ -331,13 +332,12 @@ void XQMainWindow::loadDocumentQML( const QString& fileName )
|
||||
XQQuickWidget* quickChild = new XQQuickWidget(_tabWidget);
|
||||
//quickChild->setResizeMode(QQuickWidget::SizeViewToRootObject);
|
||||
|
||||
quickChild->rootContext()->setContextProperty("meinModel", childModel);
|
||||
quickChild->setSource(QUrl(QStringLiteral("qrc:/quickview.qml")));
|
||||
_tabWidget->addTab( quickChild, "Fitze!" );
|
||||
quickChild->rootContext()->setContextProperty("myChildModel", childModel);
|
||||
quickChild->setSource(QUrl("qrc:/xqtableview.qml"));
|
||||
_tabWidget->addTab( quickChild, "QML:"+fName );
|
||||
_tabWidget->setCurrentWidget( quickChild );
|
||||
quickChild->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//! liest eine XML datei namens 'fileName'
|
||||
|
@@ -52,10 +52,11 @@ public slots:
|
||||
void onSectionCreated( const XQModelSection& section);
|
||||
void onSectionToggled( const XQModelSection& section );
|
||||
|
||||
static void setupWorkingDir();
|
||||
|
||||
protected:
|
||||
|
||||
void setupWorkingDir();
|
||||
|
||||
|
||||
// fixme implement
|
||||
void showDocumnet( const QString& key ){}
|
||||
|
Reference in New Issue
Block a user