Results 1 to 4 of 4

Thread: adding QAction to QDialog is not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Posts
    77
    Thanks
    14
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: adding QAction to QDialog is not working

    Hi!

    void QWidget::addAction ( QAction * action )
    -Appends the action action to this widget's list of actions.

    Create an QToolButton add the action to the button with:

    void QToolButton::setDefaultAction ( QAction * action ) [slot]

    then add the button to the QDialogs layout.

  2. #2
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: adding QAction to QDialog is not working

    thanks,

    Its working.

    But i am having one more problem.

    Actions i have added now has button like appearance. Is it possible to have action like appearance.

    Regards,
    ~Sanjay

  3. #3
    Join Date
    Aug 2006
    Posts
    77
    Thanks
    14
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: adding QAction to QDialog is not working

    You could add this action to QToolBar and add this toolbar to the dialogs layout

    or take a look at:

    http://doc.trolltech.com/4.4/widgets-styles.html

Similar Threads

  1. Replies: 11
    Last Post: 31st May 2007, 01:11

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.