PDA

View Full Version : How to Swap the tabs(similar to Google chrome)



GT Development
4th October 2011, 06:02
Hi,

I have created a tab widgets with four tabs. How to swap those tabs? (for example swapping of two tabs in Google Chrome)

Regards,
Priya

kalgorithmist
5th October 2011, 05:03
tabWidget->setMovable (true);

In the embedded designer in QtCreator, select the tab widget in the main window and look in the properties list for movable and tick it.

GT Development
7th October 2011, 10:24
Thanks a lot... It works... Can you give me an idea how to do tear off tabs in qt.... i.e. drag and drop the tab outside the widget to open as a new window....

nish
7th October 2011, 14:31
Thanks a lot... It works... Can you give me an idea how to do tear off tabs in qt.... i.e. drag and drop the tab outside the widget to open as a new window....

there is no straightforward solution for this in Qt. You will have to play with system's api. google for it, may be somebody already did it (or take a look at chrome source)