Results 1 to 7 of 7

Thread: Dockable windows

  1. #1
    Join Date
    Jul 2008
    Posts
    11
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Dockable windows

    What is the best way to create an application like the "QT Main Window Demo" using Qt Designer?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Dockable windows

    "Just do it"? Have you tried if yourself? Did you experience any problems?
    J-P Nurmi

  3. #3
    Join Date
    Jul 2008
    Posts
    12
    Thanks
    2

    Default Re: Dockable windows

    Yes ! "Just Do It" it helps

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Dockable windows

    Quote Originally Posted by jirach_gag View Post
    Yes ! "Just Do It" it helps
    Well, Qt Designer supports designing dock widgets so that's all I have to say unless the original poster elaborates the problem. The more specific question one comes up with the more specific answer s/he usually gets. If the problem is about how to place a dock widget on the form, here is what Qt Designer manual has to say about it: Dock Widgets.
    J-P Nurmi

  5. #5
    Join Date
    Jul 2008
    Posts
    11
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dockable windows

    I placed several dock widgets in a "main window" inside a "grid layout" . The problem is that the "grid layout" does not perfectly fill the "main window" and does not resize with the window. This works in the "demo" but they, of course, don't use the designer.

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Dockable windows

    Quote Originally Posted by blaylockr View Post
    I placed several dock widgets in a "main window" inside a "grid layout".
    Placing a dock widget into a grid layout kills most of its features. It won't be a dockable widget anymore. QMainWindow has a special layout which can handle dock widgets like they should. That's why Qt Designer offers a main window template, like mentioned in the Qt Designer manual link in my previous post.

    The problem is that the "grid layout" does not perfectly fill the "main window" and does not resize with the window.
    Floating layouts don't follow the size of the form. Deselect all children and select a layout from the toolbar instead. That way you'll install so called top level layout which will follow the form size.
    J-P Nurmi

  7. The following user says thank you to jpn for this useful post:

    blaylockr (11th August 2008)

  8. #7
    Join Date
    Aug 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dockable windows

    Quote Originally Posted by blaylockr View Post
    I placed several dock widgets in a "main window" inside a "grid layout" . The problem is that the "grid layout" does not perfectly fill the "main window" and does not resize with the window. This works in the "demo" but they, of course, don't use the designer.
    I have successfully re-create the DockWidget sample using Qt Designer to create all the user interface; including the dock. After the GUI complete I just add code to fill in the widget and add code for signal-slot.

    One thing to remember is to set on the "dockable" property before arranging the widget in the "grid" layout. I got this right after some trial&error

    PS: I also have to re-create the dock for "Cute Editor" sample from chapter 4 of Daniel Molkentin "The Book of Qt 4" doing the same method.

Similar Threads

  1. Windows not appearing in XP.
    By beardybloke in forum Qt Programming
    Replies: 7
    Last Post: 24th October 2007, 17:32
  2. Deploying with MySQL support under Windows
    By KShots in forum Installation and Deployment
    Replies: 1
    Last Post: 12th October 2006, 09:19
  3. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00
  4. MDI windows without QWorkspace
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 17:15

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.