Results 1 to 9 of 9

Thread: Sharing same QToolbar amongst multiple QMainWindows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Sharing same QToolbar amongst multiple QMainWindows

    Do not copy contents of one toolbar to the other. Have a function that will create identical toolbars instead.

    Qt Code:
    1. QToolBar *createToolBar(QMainWindow *window) {
    2. QToolBar *tb = new QToolBar(window);
    3. tb->addAction(action1);
    4. tb->addAction(action2);
    5. // ...
    6. return tb;
    7. }
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    Henry Blue Heeler (29th December 2013)

Similar Threads

  1. [QtDesigner] Multiple rows of QToolBar
    By Malutek in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2013, 15:23
  2. how to set the QToolBar's actions to multiple rows
    By fly542 in forum Qt Programming
    Replies: 2
    Last Post: 25th July 2011, 03:00
  3. Replies: 4
    Last Post: 2nd July 2010, 21:16
  4. Replies: 4
    Last Post: 17th October 2009, 22:31
  5. How to change between QMainWindows???
    By webquinty in forum Newbie
    Replies: 3
    Last Post: 16th October 2009, 10:46

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.