Results 1 to 5 of 5

Thread: Always undocked dock Widget

  1. #1
    Join Date
    Jul 2014
    Posts
    16
    Qt products
    Qt5
    Platforms
    Windows

    Default Always undocked dock Widget

    Hello.

    In qt designer i added dock widget.

    But in features i saw and select these options
    Qt Code:
    1. DockWidgetArea - "No dock widget area"
    2. AllowedAreas - no Dock widget area
    3. floating (selected - true)
    4. dockwindowmoveable - true
    5. dockwindowfloatable - true
    To copy to clipboard, switch view to plain text mode 

    And there is one more option called 'docked'

    But this option is gray (i cant do nothing with this feature)

    When i set 'floating' option and start program my dock widget is undocked but when i press 2 LPM my dock widget is going to dock.

    So the question is:

    How to UNDOCK dock widget for all the time ? (dock widget cant be closeable)

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Always undocked dock Widget

    If you want a window that is never docked, why use a QDockWidget?
    Wouldn't a normal child window be more appropriate if you don't need any of the dock widget features?

    Cheers,
    _

  3. #3
    Join Date
    Jul 2014
    Posts
    16
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Always undocked dock Widget

    Okey but, when i make own window i saw second title in system bar (bottom bar)

    (one with main program + second with window) - i dont want it

  4. #4
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Always undocked dock Widget

    Set the main window as the parent of the second window. Then second window shouldn't appear in the task bar.

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Always undocked dock Widget

    Quote Originally Posted by Infinity View Post
    Set the main window as the parent of the second window. Then second window shouldn't appear in the task bar.
    Right.
    I would suggest using QDialog as the window base class, it has all window flags set appropriately.

    Cheers,
    _

Similar Threads

  1. Replies: 1
    Last Post: 10th August 2014, 21:06
  2. How To Center Dock Widget?
    By steadi in forum Newbie
    Replies: 1
    Last Post: 5th November 2012, 22:05
  3. create dock widget from some other widget
    By Onanymous in forum Qt Programming
    Replies: 1
    Last Post: 16th December 2011, 15:22
  4. Dock Widget problems
    By dbrmik in forum Newbie
    Replies: 5
    Last Post: 17th April 2009, 12:39
  5. sliding dock widget
    By manishkyl in forum Qt Programming
    Replies: 0
    Last Post: 28th July 2008, 14:04

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.