PDA

View Full Version : QDockWidget



ToddAtWSU
27th November 2007, 18:57
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!

jpn
27th November 2007, 22:06
A descriptive screenshot would certainly help us to understand the problem..

ToddAtWSU
27th November 2007, 22:26
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!

ToddAtWSU
28th November 2007, 15:29
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!

jpn
28th November 2007, 16:49
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"?

ToddAtWSU
28th November 2007, 17:13
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!

ToddAtWSU
29th November 2007, 14:37
Has anybody gotten a chance to try this on a Solaris box to see if they have the same problem? Thanks!