semi fixed missing sections

This commit is contained in:
Christoph Holzheuer
2025-09-16 16:45:21 +02:00
parent 28aa03b31a
commit bf49d8321f
5 changed files with 31 additions and 31 deletions

View File

@@ -117,9 +117,9 @@ void XQMainWindow::initMainWindow()
// #2. load demo data
loadDocument( c_DocumentFileName1 );
//loadDocument( c_DocumentFileName2, true );
loadDocument( c_DocumentFileName2, true );
//loadDocument( c_DocumentFileName2 );
loadDocument( c_DocumentFileName3 );
//loadDocument( c_DocumentFileName3 );
qDebug() << " --- all here: " << XQNode::s_Count;
@@ -260,7 +260,7 @@ void XQMainWindow::onTreeViewItemClicked( const XQItem& item )
void XQMainWindow::onTreeViewItemChanged(const XQItem& item )
{
qDebug() << " --- TREE VIEW itemChanged:" << item.text() << " : " << item.parent()->text() << " : " << (void*)&_mainModel << " : " << (void*) sender();
qDebug() << " --- TREE VIEW itemChanged: text" << item.text() << " parent: " << item.parent()->text() << " type: " << item.itemType().text() << " : " << (void*)&_mainModel << " : " << (void*) sender();
// hier müssen wir erst das projekt aktivieren
XQItem* xqItem = static_cast<XQItem*>(item.parent());
onTreeViewItemClicked( *xqItem );
@@ -269,7 +269,7 @@ void XQMainWindow::onTreeViewItemChanged(const XQItem& item )
int idx = _tabWidget->currentIndex();
if(_documentStore.contains(idx) )
{
qDebug() << " --- should toggle: " << item.text();
qDebug() << " --- Has Document and might toggle: " << item.text();
XQViewModel& childModel = *_documentStore[idx].viewModel;
childModel.onToggleSection(item.text());
}
@@ -362,6 +362,7 @@ XQChildModel* XQMainWindow::createChildModel( const XQNodePtr& contentRoot )
// model inhalte laden
childModel->addModelData( contentRoot->first_child() );
childModel->setObjectName( contentRoot->friendly_name() );
return childModel;
@@ -404,7 +405,7 @@ void XQMainWindow::loadDocument( const QString& fileName, bool useQML )
QWidget* childView{};
if(useQML)
{
XQQuickWidget* quickView= new XQQuickWidget(_tabWidget);
XQQuickWidget* quickView = new XQQuickWidget(_tabWidget);
//quickChild->setResizeMode(QQuickWidget::SizeViewToRootObject);
quickView->rootContext()->setContextProperty("xtrChildModel", childModel);