Results 1 to 1 of 1

Thread: Adding DockWidget in the centre widget of the mainWindow

  1. #1
    Join Date
    Jun 2012
    Posts
    173
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    48
    Thanked 2 Times in 2 Posts

    Default Re: Adding DockWidget in the centre widget of the mainWindow

    Hello,

    when i add the dockWidget to the mainWindow it will be added to one of the four sides (top, bottom, left or right), but I want to add the dockWidget in anyplace just as other widgets.

    to do that, this is what i did:
    1 - Created a new widget class,
    2 - Added dockWidget to the newWidget.
    3- Added other objects that want to the DockWidget.
    so basically now I have newWidget that has only dockWidget.

    after that in the mainWindow, i created an object from the newWidget added it to gridLayout I have on the mainWindow.

    Now, everything looks nice and exactly as I wanted, the issue I have is:

    when I float the dockWidget, it will float fine but i can not move it around , it will stay in the corner of the screen and I can not move it. i can re-size it as I want though.

    so any Idea what i need to set or change so i ll be able to move it.

    thanks.


    Added after 1 14 minutes:


    I just added an example of what im trying to do. DockWidgetExample.zip
    Last edited by jesse_mark; 18th September 2013 at 19:29.

Similar Threads

  1. Replies: 0
    Last Post: 6th November 2011, 10:22
  2. Replies: 4
    Last Post: 17th August 2010, 20:38
  3. Replies: 1
    Last Post: 15th August 2010, 22:40
  4. Replies: 3
    Last Post: 4th September 2009, 13:49
  5. How to put a DockWidget or Widget over others??
    By dungsivn in forum Qt Programming
    Replies: 6
    Last Post: 25th October 2007, 07:12

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.