Resize a TreeWidget within a TabWidget if the MainWindow is maximized
-
I want to setGeometry(..) of my TreeWidget within a TabWidget if the MainWindow is maximized with one click on the toolbar icon.
But do not find a signal for MainWindow maximized.So I'll have to code such a signal?
P.S. Setting QLayout for my TreeWidget won't work in my case.
-
Yes, no such signal exists, "But you can use event if you want":http://qt-project.org/doc/qt-4.8/qwindowstatechangeevent.html
bq. if the MainWindow is maximized with one click on the toolbar icon.
Do you mean the action is always triggered by the toolbutton? why not resize you treewidget here?
Note : Due to limitations on some window systems, this does not always report the expected results (e.g., if the user on X11 maximizes the window via the window manager, Qt has no way of distinguishing this from any other resize). This is expected to improve as window manager protocols evolve.
-
I meant the usual way of maximizing the main Window by clicking on the appropriate icon at the window frame.
But thanks anyway.
Will try out your proposal to-morrow.