Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.10, 6.4.2
-
None
-
Windows 10
Description
Noticed on windows that setting a QColumnView's preview widget to something before any data has been added to a QStandardItemModel object (though the empty object has been set as the model of the QColumnView at this point) causes the object to break and then be unable to display anything (no data will ever show, no preview object will show). Oddly enough, this only seems to happen on windows, on a linux build of the same code, it works fine. Excerpt from the code:
QStandardItemModel model_image_state; ... setupfunc(...) { ... colview_IMG_Images->setModel(&model_image_state); colview_IMG_Images->setPreviewWidget(verticalLayoutWidget); QStandardItem *group = new QStandardItem(QString("Image %1")); QStandardItem *child = new QStandardItem(QString("Slot %1")); group->appendRow(child); model_image_state.appendRow(group); }
If I run the above, I get this:
If I switch the code around to this, I get:
QStandardItemModel model_image_state; ... setupfunc(...) { ... colview_IMG_Images->setModel(&model_image_state); QStandardItem *group = new QStandardItem(QString("Image %1")); QStandardItem *child = new QStandardItem(QString("Slot %1")); group->appendRow(child); model_image_state.appendRow(group); colview_IMG_Images->setPreviewWidget(verticalLayoutWidget); }