PDA

View Full Version : How to use the mouse to control the dockwidets example



jqt
21st June 2012, 16:44
I am running QT 4.7.3 on Linux.
I am happily running the examples/docwidgets example.

I have some basic questions about how to use my mouse to move the docked windows around.

When it first comes up, the Customers and Paragraphs widgets are docked on the right side as separate widgets with the Customers on the top and the Paragraphs under it.

If I click on the dock/undock button (next to the close button) on the Customers menu, it undocks the Customers widget and the Paragraphs widget grows to take up all the space.

Is there a way to move the detached Customers widget to the left or right sides and get it to dock there? I cannot seem to get it to do anything at this point other than move the window around.

If I hit the dock/undock button again it puts the Customers widget back to where it started, docked to the right side above the Paragraphs widget.

Now I drag the Customers widget using its menu bar to the left. If I wiggle it around and do not let it go past the left edge of the main window, it seems to eventually cause the left dock port to open and then if I release the drag it connects there.

Now I do the same thing with the Paragraphs widget and I can get it to dock at the left above the Customers widget.

Now if I drag the Customers widget up and down a bit and release it, it seems to put it into tabbed mode, where the Paragraphs widget and Customer widget are the 2 tabs.

What exactly did I do to get it into the tab mode?
How do I get it out of tab mode?

If I use the undock button on both and then redock them, it puts them back on the left docking port still in tab mode.

Are there other things I can do with the mouse that I haven't mentioned?


Thanks

jqt
9th July 2012, 13:53
The trick to moving the window into a docking port is the cursor. I was trying to control getting the docking port to open, with the corner or edge of the window I wanted to dock there.

What actually controls the docking port is the cursor. When I put the cursor on the window's title bar to drag it to a docking port, when the cursor hits the dotted line denoting the docking port, the port opens!

I hope this will be helpful to others.