October 12, 2011

fluca1978 fluca1978
Ant Farmer
524 posts

[SOLVED]suggestion for actions default behavior when uncheked

 

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?

2 replies

October 12, 2011

Andre Andre
Area 51 Engineer
6031 posts

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?

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

October 12, 2011

fluca1978 fluca1978
Ant Farmer
524 posts

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.

 
  ‹‹ [SOLVED]problem with setCentralWidget      How to download xml file and parse it using qt. ››

You must log in to post a reply. Not a member yet? Register here!