Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Resize events for dock widgets?
Evening all,
I'm using a 3d rendering package and trying to create a Qt widget.
I've created a widget and it seems to be working fine so far.
When I use the widget with a main window that uses dock widgets I need to move and resize my widget in response to the user rearranging the window.
I sub classed the move and resize events but they never fire.
As a test in the paint event I move and resize the window every time it paints. That works just fine but is horribly wasteful.
Is there a better way to detect changes of the widget geometry?
I'm using Qt 4.7 on both Windows and Linux.
Thanks
It looks like the events are fired in the Linux version but not in the Windows version.
I was able to refactor this and make it work. In the dock widget I catch the dockLocationChanged() event and send it to the child widget. This tells the child it can redraw itself because the all the widgets in the main window will change size and/or position
I have a further update. the resize and move events do work in both environments. The issue turned out to be a bug in my linux code. It creates a new gl window and provides it to Qt for the widget. It was not retrieving the window id of the new window correctly. Since qt didn't see a valid child window for the widget no events were ever generated for the non existent window.