Results 1 to 4 of 4

Thread: Insert separate QToolBar into QMainWindow

  1. #1
    Join Date
    Apr 2006
    Location
    Saint-Petersburg, Russia
    Posts
    63
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Insert separate QToolBar into QMainWindow

    Hello, All !

    I have to insert QToolBar into QMainWindow. I saw algorithm, all text
    and image data gathered into QMimeData object and setParent ( MainForm*
    ) for QToolBar and I have some questions:
    1. Which way I can recognize what widgets are contained by QToolBar ?
    2. What event handlers must be reimplemented in QToolBar and QMainWindow classes ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Insert separate QToolBar into QMainWindow

    Quote Originally Posted by YuriyRusinov
    Hello, All !

    I have to insert QToolBar into QMainWindow. I saw algorithm, all text
    and image data gathered into QMimeData object and setParent ( MainForm*
    ) for QToolBar and I have some questions:
    1. Which way I can recognize what widgets are contained by QToolBar ?
    2. What event handlers must be reimplemented in QToolBar and QMainWindow classes ?
    What do you mean here? Wouldn't using QMainWindow::addToolbar() be what you want?

  3. #3
    Join Date
    Apr 2006
    Location
    Saint-Petersburg, Russia
    Posts
    63
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Insert separate QToolBar into QMainWindow

    I have main window application and separate toolbar from third party library, I want to add this toolbar into main window by mouse moving in runtime to appropriate toolbar area using drag and drop technique.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Insert separate QToolBar into QMainWindow

    This might not be possible or at least not easy. It would involve embedding the external window into a Qt widget. And it would still be an external application, as Qt works with QWidget derived widgets only.

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.