QDockWidget layout changes after minimizing mainwindow
-
I have strange issues too with QDockwidgets. After mutliple showing/hiding combinations their size changes. I'm wondering if it appears with Qt 4.8.3 or 4.8.4 since I did not notice this behavior before.
-
[quote author="Julien M" date="1361394104"]I have strange issues too with QDockwidgets. After mutliple showing/hiding combinations their size changes. I'm wondering if it appears with Qt 4.8.3 or 4.8.4 since I did not notice this behavior before.
[/quote]Yes, I have the same problem!
I have a mainwindow with a lot of dockwidgets (17).
Of course some of are hidden and some of are shown.
I used them like a perspective. I have several perspective, and every perspective contains some dockwidgets wich are shown there.But!
When I change between the perspectives (means: show or hide the dockwidgets), I always have problem with the size of dockwidgets. They are always arbitrarily changing! This is so annoying.
I cannot find solution for this problem.One more problem what I have:
I use some dockwidgets as overlapped (tabifyDockWidget()).
But we don't have "out-of-box" disTabifyDockWidget().
And when dockwidgets are hidden and tabified I can't query the tabifiedDockWidgets! Always give me a wrong result (empty list).And:
There are a saveState() and restoreState() methods. These save the dockwidgets position and state. But these are also buggy.
I cannot restore the saved state of my dockwidgets...I use Qt 4.8.3, QtCreator 2.5.2, g++ 4.6.2, Win7
-
saveState() and restoreState() are not buggy in my opinion.
But since you are (like me I guess) hiding/showing QDockWidgets at application start, the "bug" we both mentioned messes up the dockwidgets's sizes.I would like to build a simple project in order to demonstrate the issue but it's a bit random and I'm not always able to reproduce it. (sometime each time I hide then re-show a QDockwidget it is shrinking a bit more until it reaches its minimum size)
broadpeak: did you had this issue with previous builds of Qt?
-
[quote author="Julien M" date="1361530797"]
saveState() and restoreState() are not buggy in my opinion.
But since you are (like me I guess) hiding/showing QDockWidgets at application start, the "bug" we both mentioned messes up the dockwidgets's sizes.I would like to build a simple project in order to demonstrate the issue but it's a bit random and I'm not always able to reproduce it. (sometime each time I hide then re-show a QDockwidget it is shrinking a bit more until it reaches its minimum size)
broadpeak: did you had this issue with previous builds of Qt?
[/quote]I don't know which is wrong: save or the restore method.
I get a binary (ByteArray) file in save, and I cannot "humanread" that content. So I cannot decide, that in saving everything is good."shrinking" problem: I see the same! When I show and hide more times one after the other, continuously shrinking its size to minimalsize.
My project has started in summer last year. I used at that time the original Nokia Qt packet, in this packet the version of Qt was 4.7.4. The problem existed at that time TOO!
But circa 2-3 month ago I changed the version to 4.8.3. But the problem still exist... -
Do you have the problem with all your QDockWidget or just some of them?
I'm wondering if it is linked to the fact that some contain spacers while others don't. -
[quote author="Julien M" date="1361537649"]Do you have the problem with all your QDockWidget or just some of them?
I'm wondering if it is linked to the fact that some contain spacers while others don't.[/quote]I have problem with all of them.
-
By chance, did you tried compiling with Qt5?
-
[quote author="Julien M" date="1361816400"]By chance, did you tried compiling with Qt5?[/quote]
No, I haven't tried it. I use only Qt 4.8.3
In our firm we (all) use the same verison of Qt, because of compatibility issues. And currently we are waiting for a "stable" Qt5. -
@broadpeak: Looks like I only have issues with QDockWidgets that contain a QListView/QListWidget or QTableView/QTableWidget. Is it your case too?
Within designer, if you preview your GUI (Ctrl+R) and undock a QDockWidget with a QListView, then its size is altered and that could explain why it is not redocking properly.
-
[quote author="Julien M" date="1363690038"]@broadpeak: Looks like I only have issues with QDockWidgets that contain a QListView/QListWidget or QTableView/QTableWidget. Is it your case too?
Within designer, if you preview your GUI (Ctrl+R) and undock a QDockWidget with a QListView, then its size is altered and that could explain why it is not redocking properly.[/quote]
In my dockwidgets: there are 10 tableview, 5 listview, 1 treeview and 1 graphicsview.
I use no designer for this project, I build all of the widgets "by hand" (*.h, *.cpp).