Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.4, 6.6.1
-
None
Description
Good morning,
since I installed the QT version 6.6.1/6.5.4 I have encountered anomalous behavior.
If I use a QStackedWidget, a QTreeView, use stylesheets and try to set the size of the tree view columns, this happens:
1) I set the stylesheet in main.cpp;
I create the MainWindow.
With this declaration the columns are sized to 100 and my settings are not respected.
2) If I remove the style sheet in main.cpp everything works correctly;
3) leaving the style sheet, to make everything work I have to:
in the MyWidget class, to the QTreeView, I have to pass the stacked widget as parent and not this;
in the MainWindow class I have to create the container, call setCentralWidget, create the MyClass instance and pass the stacked widget contained in the container as a parent.
I attach a small example project.
In the MainWindow.cpp file activate the define NO_ERROR to make the program work correctly.
In Qt version 6.6.0 everything worked correctly.
I tried the one suggested in BUG120418 but it doesn't work.