Results 1 to 17 of 17

Thread: Why are actions limited to menus and toolbars?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Why are actions limited to menus and toolbars?

    Hmm... when I think of "action" I belive this is something that I can trigger. With checkboxes I don't see how marking it as checked or not triggeres some action. Of course, an action can be checkable, but it still is (logically) associated with some action being taken. For me it would make more sense to associate an action with a QPushButton more than with QCheckBox. But we have QToolButton for that An action associates things like text, icon, tool tip, etc. not only a slot which will get run after activating the widget. Both QPushButton and QCheckBox (and QRadioButton too) are just not meant for actions. If you want, you can always subclass them and add a feature of associating an action with each of them. There is a changed() signal in QAction. I belive you can use it for that.

  2. The following user says thank you to wysota for this useful post:

    desch (27th November 2007)

Similar Threads

  1. More problems with Menus and Toolbars
    By mridey in forum Qt Tools
    Replies: 2
    Last Post: 16th November 2006, 11:37

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.