PDA

View Full Version : How to catch the event of QToolBar when change its area



vql
9th April 2008, 17:13
When a toolbar add to mainwindow, user can drag and drop it to change area (BottomToolBarArea, TopToolBarArea, ...)

How to catch the event when it changes area?
I tried all available signals of QToolBar but it's not working.

Thanks.

VlJE
24th November 2008, 15:04
I found your issue by searching how to prevent the toolbar to desappear by clicking on the context menu...
Add the slot for the "orientationChanged" signal to your main window.
If you works with designer and your toolbar name is "toolBar",
add the on_toolBar_orientationChanged ( Qt::Orientation) Slot to the main window class.
I have tested, it works.

aamer4yu
24th November 2008, 16:19
Doesnt QToolBar::allowedAreasChanged help you ??