Results 1 to 16 of 16

Thread: Bug in Qt Designer 4.4.3?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    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?

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

    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?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    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.

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

    martinb0820 (9th January 2009)

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

    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

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

    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.

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
  •  
Qt is a trademark of The Qt Company.