Results 1 to 16 of 16

Thread: problems creating toolbar...(do see the attachment)!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problems creating toolbar...(do see the attachment)!

    Hi, why not
    QAction * QToolBar::addWidget ( QWidget * widget ) I had used it to embed QComboBox in toolbar and it worked fine.
    This method is meant exactly for such cases!

    Adds the given widget to the toolbar as the toolbar's last item.
    If you add a QToolButton with this method, the tools bar's Qt::ToolButtonStyle will not be respected.
    This one is important:
    Note: You should use QAction::setVisible() to change the visibility of the widget. Using QWidget::setVisible(), QWidget::show() and QWidget::hide() does not work.
    So, insert your combobox directly without any layouts and additional widgets.
    and try with combobox created withoud any parant,
    addWidget () should deal with everything(reparenting, layout etc.) by itself, so simply do not disturb it.
    Qt Code:
    1. theQuickFinder = new ElQuickFinder();
    2. theFindToolBar->addWidget(theQuickFinder);
    To copy to clipboard, switch view to plain text mode 
    works fine in my app.

    You can read also about related
    QWidget * QToolBar::widgetForAction ( QAction * action ) constmethod.
    Last edited by mchara; 1st September 2008 at 09:16.
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

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.