[Interest] How to detect moment when window/widget fully resized at startup?

Igor Mironchik igor.mironchik at gmail.com
Mon Jan 19 09:58:26 CET 2015


Hi.

On Mon, 19 Jan 2015 11:53:49 +0300, André Somers <andre at familiesomers.nl>  
wrote:

> Igor Mironchik schreef op 19-1-2015 om 09:48:
>> Hi. I have one not very simple question. I need to know the size of the
>> window when it launched and all Qt/OS preparations done.
>>
>> For example, in main() I launch QWidget::showMaximized(). On my Windows  
>> 7
>> this leads to resizeEvent( 640, 480 ) -> resizeEvent( 640, 480 ) when
>> actual size of the window is( 1366, 706 ). And I don't know when to get
>> the size() property of my widget to be sure that it is resized.
>>
>> How to detect this moment in Qt?
>>
>> Thank you.
>>
> Do you mean that you're not getting the resizeEvent to the actual size
> at all? That would be strange.

Yes, I mean exactly this. I don't receive resizeEvent() with actual size.  
At startup I receive two resizeEvent() but with default ( 640, 480 ) size  
and not the actual size ( 1366, 706 ).

>
> As for how you know that this is the "final" event: you don't. One way
> would be to wait a little bit when receiving the event before deciding
> to act on it. If you get a new resize event in the mean time, restart
> your wait period.
>
> André
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


-- 
Best Regards,
Igor Mironchik.



More information about the Interest mailing list