Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Qt signals "and" logic

Status
Not open for further replies.

emresel

Full Member level 5
Full Member level 5
Joined
Feb 12, 2008
Messages
267
Helped
61
Reputation
122
Reaction score
61
Trophy points
1,308
Location
Turkiye
Activity points
2,863
Hi;
I am not sure if much people in here interesting Qt.
It is based on signals and slots. I am also new on that...
What i want to do is to trigger a slot when two signals are emitted.
Something "if signal1 and signal2 is emitted then trigger slot".
I couldn't figure out how to do so.
Basically connecting two signals to a slot doesn't help, because in this case "when signal1 or signal2 emitted, then slot is executed".
It is "or" logic of signals.
Somehow i need "and" logic.

Any idea?

Kind regards
 

Is your signal a simple On/Off change in volt level? Then it should be easy to distinguish by diode logic.

Did you find you cannot use diode-resistor 'AND' circuits, or diode-transistor type?

Or maybe your signals is pulsed DC, or AC? Then you have to convert it to something which is easy to detect. Then you feed it to the 'AND' circuit.
 

What i want to do is to trigger a slot when two signals are emitted.
Something "if signal1 and signal2 is emitted then trigger slot"

Are you connecting them by using Qsignalmapper?
 

Hi;
I directly connect two signals to slot with the standard connect syntax.
As i checked Qsignalmapper, it helps to map multiple signals to single slot but i couldn't figure out if it is possible "and"ing signals or give any order to signals with signalmapper.
Is it possible?
Could you please give me any related example?

Thanks
 

You could set flags there, and make the AND logic externaly, at the main loop.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top