Results 1 to 16 of 16

Thread: Bug in Qt Designer 4.4.3?

  1. #1
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Bug in Qt Designer 4.4.3?

    I have a QDockWidget that was originally set for "allowedArea LeftDockWidgetArea". I tried to move it to the RightDockWidgetArea, but dockWidgetArea (directly above "docked") wouldn't change, no matter what I did...

    I set RightDockWidgetArea using Qt's Visual Studio plugin, went back to Designer, and allowedArea was now RightDockWidgetArea!

  2. #2
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Re: Bug in Qt Designer 4.4.3?

    I spoke too soon... I unchecked "docked" in Designer, and checked it again, and now the QDockWidget is again stuck with dockWidgetArea = LeftDockWidgetArea even though allowedAreas = RightDockWidgetArea.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bug in Qt Designer 4.4.3?

    Are we talking about Designer itself or your application that was designed in Designer?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bug in Qt Designer 4.4.3?

    Are we talking about Designer itself or your application that was designed in Designer?

  5. #5
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: Bug in Qt Designer 4.4.3?

    Designer itself.

    It seems like something in the .ui file is forcing the QDockWidget to the left dock area whenever "docked" has been unchecked, and is than checked again. However, I looked in the .ui file and didn't see anything relevant, for either the QDockWidget or main window.

    I can't change the dock area in Visual Studio, either, it turns out. If I set "Docked" to False so that I can position the QDockWidget, and click on "RightDockWidgetArea" from the "DockWidgetArea" pick list, the field stays set to "LeftDockWidgetArea."

    I also notice that, in Designer, "dockWidgetArea" is never changeable, but in Visual Studio, the field is able to be changed, when "Docked" is True. (Bus as soon as "Docked" is again set to False, the DockWidgetArea reverts to left.)

    Am I missing some property that needs to be set?

  6. #6
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: Bug in Qt Designer 4.4.3?

    Also, if I don't check the "docked" check box, then the QDockWidget stays where I put it, on the right. However, when not set to docked, each time the QDockWidget is undocked, and then docked again, its docked location is to the right of, and below, the last docked position. (This is in the application.)

    Am I missing something?



    Thanks in advance...
    Martin

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bug in Qt Designer 4.4.3?

    Which dock widget are we talking about? The widget box? I'm using Qt 4.4.3 and it seems I am able to move any of Designer dock widgets into any position and undocking and docking it again works as expected.

  8. #8
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Bug in Qt Designer 4.4.3?

    Its a "QDockWidget" from "Widget Box -> Containers -> Dock Widget" in Designer.

  9. #9
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: Bug in Qt Designer 4.4.3?

    Maybe I don't have the dock widget's properties set correctly?

    I've kind of decided to leave the dock widget on the left for aesthetic reasons, and I can get a layout I like if "docked" isn't checked. As soon as I check docked, the QDockWidget reverts to its original size and position.

    Also, any advice as to how to do the following would be appreciated:

    - Dock widget on upper left, resizes horizontally and vertically as the main window is dragged. (This contains an Open Inventor SoQtRenderArea.)

    - Controls (buttons, etc.) below the dock widget, and to the right of the dock widget. These should stay fixed in size; the main window shouldn't be able to get smaller than the controls.

    I'm looking at the Examples and Demos, but don't see anything that helpful done in Designer.

    Thanks in advance,
    Martin

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bug in Qt Designer 4.4.3?

    Quote Originally Posted by martinb0820 View Post
    Its a "QDockWidget" from "Widget Box -> Containers -> Dock Widget" in Designer.
    So it's about an application developed in Designer not Designer itself...

    Quote Originally Posted by martinb0820 View Post
    Maybe I don't have the dock widget's properties set correctly?
    I would not use dock widgets from within designer at all. Design your docs as regular widgets and then embed them into dock widgets using hand written code. I'm not even sure if the dock widget available in Designer can be correctly used as a child widget at all.

  11. #11
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: Bug in Qt Designer 4.4.3?

    Quote Originally Posted by wysota View Post
    So it's about an application developed in Designer not Designer itself...


    I would not use dock widgets from within designer at all. Design your docs as regular widgets and then embed them into dock widgets using hand written code. I'm not even sure if the dock widget available in Designer can be correctly used as a child widget at all.
    Actually, there are two questions at this point. The one about Designer is why doesn't it allow me to move the QDockWidget to a new docking area.

    Regarding the dock widget in the software I'm developing, as opposed to the Designer question, the dock widget is in the main window, not inside another widget. I actually am embedding an SoQtRenderArea inside the dock widget.

    Martin

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bug in Qt Designer 4.4.3?

    Quote Originally Posted by martinb0820 View Post
    Actually, there are two questions at this point. The one about Designer is why doesn't it allow me to move the QDockWidget to a new docking area.
    Because dock widgets are controlled by QMainWindow's layout. If you place a dock widget as a regular widget using the Designer, there is no layout to control it (even if you place it inside a QMainWindow).

    Regarding the dock widget in the software I'm developing, as opposed to the Designer question, the dock widget is in the main window, not inside another widget. I actually am embedding an SoQtRenderArea inside the dock widget.
    What is the exact question regarding this one?

  13. #13
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: Bug in Qt Designer 4.4.3?

    Quote Originally Posted by wysota View Post
    Because dock widgets are controlled by QMainWindow's layout. If you place a dock widget as a regular widget using the Designer, there is no layout to control it (even if you place it inside a QMainWindow).
    Dragging a dock widget from Designer's toolbox into one of the main window's docking areas turns the dock widget into a regular widget?

    Quote Originally Posted by wysota View Post
    What is the exact question regarding this one?
    I have a QDockWidget that was originally set for "allowedArea LeftDockWidgetArea" in Designer. I tried to reposition the dock widget to RightDockWidgetArea by checking Designer's check box for that docking area and unchecking the check box for the left dock area. However, Designer's "dockWidgetArea" (the properties field in Designer directly above the "docked" check box) remained set to LeftDockWidgetArea and the dock widget continues to dock in the left dock area.

    This usually works, so my question is what about this particular .ui is preventing moving the dock widget to a new docking area. Is there something in the .ui file that Designer isn't showing me that needs to be edited (I looked and didn't see anything that appeared to be relevant), is there some combination of properties for the dock widget and/or main window that I have wrong or is this a bug in Designer?

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bug in Qt Designer 4.4.3?

    Quote Originally Posted by martinb0820 View Post
    Dragging a dock widget from Designer's toolbox into one of the main window's docking areas turns the dock widget into a regular widget?
    Are you sure you are dragging it into a docking area? You are dropping the widget onto the main window's central widget, not the main window itself. Check the object hierarchy - the dock widget is child of the central widget, not the child of the main window itself, at least in my 4.4.3 Designer.

    Only after you mark the "docked" property, the widget gets docked, but I'd say that the only thing that can be done with it.


    This usually works, so my question is what about this particular .ui is preventing moving the dock widget to a new docking area. Is there something in the .ui file that Designer isn't showing me that needs to be edited (I looked and didn't see anything that appeared to be relevant), is there some combination of properties for the dock widget and/or main window that I have wrong or is this a bug in Designer?
    There are many hacks in Designer. You might call their behaviour "bugs", I call them "lack of functionality". Try previewing - then you'll see the difference. You'll be able to dock the window into any of the selected dock areas without a problem. Actually my Designer allows to do what you ask for - drag to left dock, change "dockWidgetArea" to right and deselect left from allowed dock widget areas - the widgets stays at the right. If you make it float and dock it back again, it breaks by going back to the left but that's where you actually docked it, remember? Lack of functionality, I guess. But yeah, you may report it as a bug, just check if it wasn't fixed already in 4.5-beta1 or any of the recent snapshots.

    I really would advise against placing dock widgets in Designer - don't clutter your view.

  15. The following user says thank you to wysota for this useful post:

    martinb0820 (9th January 2009)

  16. #15
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb Re: Bug in Qt Designer 4.4.3?

    I think I figured out the one about making the QDockWidget resize properly. I'll post the answer in another thread I started about resizing a QDockwidget. The Designer issue isn't holding me up, so I'm not going to pursue it at this point.

  17. #16
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Bug in Qt Designer 4.4.3?

    Quote Originally Posted by wysota View Post
    Are you sure you are dragging it into a docking area? You are dropping the widget onto the main window's central widget, not the main window itself. Check the object hierarchy - the dock widget is child of the central widget, not the child of the main window itself, at least in my 4.4.3 Designer.

    Only after you mark the "docked" property, the widget gets docked, but I'd say that the only thing that can be done with it.
    I didn't see your reply quoted above when I added mine about having found an answer. Having figured out how it works, I understand now what you mean about the dock widget being a child of the central widget. This does become clear looking at the object heirarchy in the Object Inspector.

    Your earlier reply about child widgets got me thinking along the lines that led to a workable solution - thanks for your input!

    Martin

Similar Threads

  1. Threads in Designer plugins
    By hvengel in forum Qt Tools
    Replies: 2
    Last Post: 3rd January 2009, 19:19
  2. centralWidget and QDockWidgets in designer
    By momesana in forum Qt Tools
    Replies: 1
    Last Post: 18th December 2006, 11:56
  3. Replies: 13
    Last Post: 15th December 2006, 11:52
  4. Designer crashes when selecting some widgets
    By gwendal in forum Qt Tools
    Replies: 4
    Last Post: 21st July 2006, 13:18
  5. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28

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.