Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15832

QLayoutItem, QLayout sizeHint is incorrect if parent widget already visible/show

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.6.3
    • None
    • Fedora 13
      Linux 2.6.34.7-61.fc13.x86_64 #1 SMP Tue Oct 19 04:06:30 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

      The sizeHint of the created QLayoutItem in a QLayoutBox is incorrect if the parent widget of the layout is already visible (show has already been called). This in turn causes the sizeHint of the QLayoutBox itself to be invalid. At some point they correct themselves, but if you need the size immediately (as I do) it doesn't work.

      No workaround is known.

      The attached code demonstrates the issue (compare with/without the "show" line).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            mortoray edA-qa mort-ora-y
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes