Results 1 to 4 of 4

Thread: How could I create an action like the image shown by QtDesigner?

  1. #1
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default How could I create an action like the image shown by QtDesigner?

    As the graph show(surrounded by a red circle), I want to nested some actions into the icons and tell
    the users this message by an arrow(how should I call this kind of UI?).
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How could I create an action like the image shown by QtDesigner?

    QToolButton and call QToolButton::addAction() multiple times (or addActions()) with the popup menu actions. Call setDefaultAction() if you want a single click to do something. Also look at the popupMode().

  3. The following user says thank you to ChrisW67 for this useful post:

    stereoMatching (6th February 2014)

  4. #3
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How could I create an action like the image shown by QtDesigner?

    Sorry, my title did not express my intention correctly.

    What I want to ask is, how could I design this kind of UI by QtDesigner(without hand coding)?

    ps : I know how to do it by codes

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How could I create an action like the image shown by QtDesigner?

    You cannot AFAICT. You can place the default action (QToolButton) on the tool bar, set its properties, and create the other actions in Designer. Adding the other actions to the tool button needs to be done in code.

  6. The following user says thank you to ChrisW67 for this useful post:

    stereoMatching (10th February 2014)

Similar Threads

  1. Create custom plugin into qtdesigner with qt5 alpha
    By alizadeh91 in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2012, 07:39
  2. Replies: 7
    Last Post: 15th November 2012, 14:22
  3. image shown in Qlabel -> size increases
    By szisziszilvi in forum Newbie
    Replies: 3
    Last Post: 16th November 2011, 10:17
  4. Replies: 3
    Last Post: 29th May 2008, 22: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.