Results 1 to 2 of 2

Thread: Toolbar

  1. #1
    Join Date
    Jun 2008
    Qt products

    Default Toolbar

    sorry, because my english is not very well.

    I have a toolbar in my app. and I want to put a icon in the right side of the toolbar , near the close button (X) at the form.

    what should I do ?

    thanks !

  2. #2
    Join Date
    Feb 2006
    Oslo, Norway
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Toolbar

    Qt Code:
    1. QWidget* stretchWidget = new QWidget(toolBar);
    2. stretchWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    4. toolBar->addAction(...); // actions before stretch
    5. toolBar->addWidget(stretchWidget); // stretch
    6. toolBar->addAction(...); // actions after stretch
    To copy to clipboard, switch view to plain text mode 
    PS. Please search the forums. This has been asked before.
    J-P Nurmi

Similar Threads

  1. Toolbar and icon size
    By MrGarbage in forum Qt Programming
    Replies: 0
    Last Post: 8th January 2008, 21:27
  2. Create a Toolbar on a Subclassed Textedit?
    By c_07 in forum Qt Programming
    Replies: 5
    Last Post: 12th October 2007, 18:17
  3. Adding a toolbar to a TableWidget
    By Walter in forum Qt Programming
    Replies: 2
    Last Post: 1st July 2007, 21:13
  4. Initialise toolbar in a different area
    By georgie in forum Qt Programming
    Replies: 4
    Last Post: 4th May 2006, 03:49
  5. animating a toolbar??!?
    By nupul in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2006, 08:27


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.