Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]suggestion for actions default behavior when uncheked
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]suggestion for actions default behavior when uncheked

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fluca1978
    wrote on last edited by
    #1

    Hi,
    in my application I've got a set of checkable actions that must perform all the same task when unchecked and a different task when checked. The problem is that I'd like to connect a cehcked signal to the specific behavior, and an unchecked one to the same default behavior. Unluckily, the qaction provides only a signal for trigger(bool) and toggle(bool), so I have to check within my slot if any single action is unchecked or not. Any suggestion on how to solve this easily?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Subclass QAction, add your own signals, and make a simple internal slot that emits either the checked() or the unchecked() signal based on the new state?

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fluca1978
        wrote on last edited by
        #3

        I was looking for a simpler out-of-the-box way, but since it is not so hard to coding this one, I will take it!
        Thanks.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved