Results 1 to 3 of 3

Thread: How to catch the event of QToolBar when change its area

  1. #1
    Join Date
    Jun 2006
    Location
    Vietnam
    Posts
    59
    Thanks
    17
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default How to catch the event of QToolBar when change its area

    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.

  2. #2
    Join Date
    Sep 2006
    Posts
    20
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to catch the event of QToolBar when change its area

    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.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to catch the event of QToolBar when change its area

    Doesnt QToolBar::allowedAreasChanged help you ??

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.