PDA

View Full Version : how to detach Tab page from QTabWidget?


rajesh
14th July 2006, 08:59
how to detach Tab page from QTabWidget?
I implemented detach tab pages using a button click “Detach“. Now I want to detach using drag Tab of tabwidget.
Any idea how to do that?

jpn
14th July 2006, 09:15
Override mouseMoveEvent (or use an event filter) and detach after the user has moved the mouse long enough range. You will receive mouse move events only when mouse button is pressed (unless mouse tracking has been set) so it is enough just to catch mouse movements. If you find it hard to find out the range, you may also catch mouse press events to get the pressing point.