Results 1 to 7 of 7

Thread: QDockWidget

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Question QDockWidget

    I am having problems trying to use QDockWidgets. This is my first time using these and they do not behave how I would plan for them to behave. I initially put them all on the right side, 4 in total, but allow them to all be moved to any of the 4 dock locations or to be floated. One thing I dislike about them is that when I move on the dock widgets to another dock area, the widgets resize stretching their items apart from each other. So I set the Horizontal and Vertical size policies to FIXED.

    After setting the size policies to FIXED, I am only able to move on dock widget to a dock area after creation. If I move one widget from the right to the left, I cannot add another widget to the left or move this widget back to the right. If I take of the FIXED size, I can move 3/4 the widgets to the left side with no problem, but not the 4th widget. Is there a reason why I can only move one widget to a side when the sizes are fixed and only move 3/4 widgets to a side when the sizes aren't fixed? Thanks again for your help!

  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: QDockWidget

    A descriptive screenshot would certainly help us to understand the problem..
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QDockWidget

    Unfortunately I will not be able to get you a screen shot. I have been able to get all 4 dock widgets from one side to the other, though it was not an easy task. It was very picky about that. So I guess what I would like to know if there is a way to keep the dock widgets from growing too tall vertically (preferably FIXED although I cannot get it to work) and still be able to move more than 1 dock widget to the same new location. I will see if I can get a small code snippet to prove my point.

    I am working on a stand-alone Sun OS 9 machine if this helps any. Thanks again!

  4. #4
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Cool Re: QDockWidget

    Well I have copied the code onto a Windows box and it works fine in Windows XP. But I still have problems getting the dock widgets to correctly move in Solaris 9. Here is a compilable piece of code that I have run on both Solaris and Windows. It works very nice and easy in Windows, but in Solaris I have no luck. Can somebody else try the code out in Solaris and see if they have the same problem as me? Thanks!
    Attached Files Attached Files

  5. #5
    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: QDockWidget

    Which style are you using, eg. what does qApp->style()->objectName() output? Does it work better if you launch the app with command line option "-style windows"?
    J-P Nurmi

  6. #6
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QDockWidget

    I thought the exaxt same thing as you so I have tried not using the -style flag, I have tried "-style cde" and "-style windows" but to no avail they all behave the same way. I could only get one dock widget on a side when I tried to move them there. They all line up on the right side when I run the program since the code tells it to go there. But after that I cannot move them to a side with multiple docks. Even using the Windows style, where you can tab the dock widgets, it would not allow me to do that. Thanks again!

  7. #7
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QDockWidget

    Has anybody gotten a chance to try this on a Solaris box to see if they have the same problem? Thanks!

Similar Threads

  1. QDockWidget Size
    By kiker99 in forum Qt Programming
    Replies: 9
    Last Post: 31st March 2007, 16:15
  2. Replies: 8
    Last Post: 4th February 2007, 00:42
  3. QDockWidget flicker
    By fellobo in forum Qt Programming
    Replies: 1
    Last Post: 28th April 2006, 20:42
  4. QTableWidget -> QDockWidget,
    By ogre in forum Qt Programming
    Replies: 3
    Last Post: 26th January 2006, 06:51
  5. QDockWidget: Debugging crash
    By carsten in forum Qt Programming
    Replies: 10
    Last Post: 7th January 2006, 10:50

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.