On Mon, 14 Apr 2008, Eskil Abrahamsen Blomfeldt wrote:

> 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.
[...]

I'm not an expert, but I think the following bunch of code inserted after
the first addition and before requesting size of the (first) added widget
could help.

Code:

QEventLoop.ProcessEventsFlags pef = new
        
QEventLoop.ProcessEventsFlags(QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents);
pef.set(QEventLoop.ProcessEventsFlag.ExcludeSocketNotifiers);
QAbstractEventDispatcher.instance().processEvents(pef);


--
Tomasz 'Trog' Welman
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to