Results 1 to 6 of 6

Thread: Change in QDockWidget resize behavior from Qt 4.3 to 4.4.1

  1. #1
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Change in QDockWidget resize behavior from Qt 4.3 to 4.4.1

    I have an application that has a "tool options" box defined in the code as a QDockWidget that floats (non-dockable), with a QStackedWidget in it that contains a series of QWidgets, each with a QGridLayout in them. The QGridLayouts contain spinboxes, labels, buttons, and checkboxes.

    In a version of the program compiled with Qt 4.3, the floating DockWidget is only resizable to a size that is as small as the largest child Widget in the QStackedWidget. When I compile now with Qt 4.4.1 I have noticed that the QDockWidget can now be resized to any size, and thus causes the child widgets to get squeezed in both axes. Here is a video explaining the behavior in more detail. The first part shows the good behavior with Qt 4.3, and the second part shows the incorrect behavior with Qt 4.4.1:

    http://blip.tv/file/1251848/

    Does anyone have an idea as to what changed between these two versions that would cause this issue? Thanks for the help,

  2. #2
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Change in QDockWidget resize behavior from Qt 4.3 to 4.4.1

    I noticed that the only difference between the documentation for QDockWidget in 4.3 vs. 4.4 is this paragraph in the SetWidget function:

    If the dock widget is visible when widget is added, you must show() it explicitly.

    Note that you must add the layout of the widget before you call this function; if not, the widget will not be visible.
    I'm not sure what that means...

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Change in QDockWidget resize behavior from Qt 4.3 to 4.4.1

    It means that you have to first set up the layout and then add the widget to the dock widget.

  4. #4
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Change in QDockWidget resize behavior from Qt 4.3 to 4.4.1

    I guess the thing I really don't understand is that if i run my executable with Qt 4.3 or even 4.4 dll files, the QDockWidget floating window works properly, and with Qt 4.4.1 dll's , it doesn't work properly , like in that video.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Change in QDockWidget resize behavior from Qt 4.3 to 4.4.1

    The changelog for 4.4.1 says:
    - QDockWidget
    * [179989] Maximum size is now taken into account by the dock widget.
    but for me this doesn't explain the behavior, but at least we know that QDockWidget code was changed and this might mean that they have fixed too much.

    If you create a widget with stacked widget in Qt Designer 4.4.1 it behaves as you expect, so most likely this is something with QDockWidget. I suggest you talk to the Trolls.

    Edit: It appears that somebody already did talk to them: http://trolltech.com/developer/task-...ntry&id=222030

  6. #6
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Change in QDockWidget resize behavior from Qt 4.3 to 4.4.1

    wow, thank you so much! that saved me a lot of headaches. I'll just wait until 4.4.2 comes out and use the old dll's for now.

    Thank you!
    dave

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.