Results 1 to 2 of 2

Thread: Spacing widgets and actions in a toolbar

  1. #1
    Join Date
    Aug 2007
    Posts
    6
    Thanks
    4

    Default Spacing widgets and actions in a toolbar

    Hello all,

    How can i space the widgets on the toolbar?
    For example in the find toolbar of Assistant, appers that the widgets are more spaced from each others, than the normal.

    Thanks!

  2. #2
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Spacing widgets and actions in a toolbar

    I tricked it like this

    Qt Code:
    1. class MyToolBar: public QToolBar
    2. {
    3. public:
    4. MyToolBar(QMainWindow *parent):
    5. QToolBar(parent)
    6. {
    7. }
    8. void addSpacing(int spacing)
    9. {
    10. QLabel *label = new QLabel(this);
    11. addWidget(label);
    12. label->setFixedWidth(spacing);
    13. }
    14. };
    To copy to clipboard, switch view to plain text mode 

    baray98

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.