Hi, Dawid.
Dawid Sip wrote:
> I dondt know why after putting first dockWidget into a Splitter and
> getting size of that dockWidget i get 0 for width and for height, but
> after putting a second dockWid into the Splitter and again getting the
> size immediately after the addition i get the right height and the
> right width. Does anyone know how to get the right size after adding
> the first dockWidget?
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() + ")");
}
I'm guessing the reason you are getting different results in your case
is that there's a different code path in the case of adding the first
widget and the subsequent ones.
-- Eskil
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest