Hi Eskil,
>
> You can't depend on the initial size of the widget prior to any event
> handling. If you need to track the size of the dock widget, I suggest
> you have your dock widget override the resizeEvent() method so that
> you know whenever it's being resized.
>
>
> @Override
> protected void resizeEvent(QResizeEvent e) {
> System.out.println("The new size: (" + e.size().width() + ", " +
> e.size().height() + ")");
> }
Well, not exactly. I need to create a bunch of objects which should
depend on one anothers resizeEvent. I need to add the dockWidget like I
showed erlier to the Splitter(the centralwidget), then add a
GraphicsView to that dockWidget, then add the a GraphicsScene to that
GraphicsView and finally add an Image to the scene, and at this moment I
need the right size of the dockWidget/GraphicsView to be able to scale
the Image to fit the dockWidgets resized dimensions.
I understand that the resizeEvent is propageted like this:
MainWindow
->Splitter
-->dockWidget
--->GraphicsView
---->GraphicsScene
----->Image
So my guess is that I have to reimplement resizeEvent of the
GraphicsScene, where i can get the size of the parent - GraphicsView and
with this size i can set the size of the Image?
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest