Results 1 to 2 of 2

Thread: Sizes in construction - different behaviour Qt5 to Qt4 (example attached)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Sizes in construction - different behaviour Qt5 to Qt4 (example attached)

    It is generally not advisable to rely on size() when the widget has not been shown yet.

    sizeHint() can come close provided no other effects influence the window's size (e.g. the windowing system resizing the window).

    size() usually has a good initial value when retrieved from showEvent() though.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    sedi (24th April 2014)

Similar Threads

  1. QGLWidget construction slow
    By ctgrund in forum Qt Programming
    Replies: 0
    Last Post: 16th June 2013, 12:31
  2. How to get printer name attached through LPT Port?
    By gurmeetsingh in forum Qt Programming
    Replies: 0
    Last Post: 20th April 2012, 14:18
  3. Replies: 4
    Last Post: 7th December 2011, 09:20
  4. Replies: 2
    Last Post: 1st April 2011, 16:37
  5. Number formatting for file name construction
    By philwinder in forum Qt Programming
    Replies: 1
    Last Post: 14th May 2008, 10:57

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.