Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
can create a user-defined signals static?Or Changing the value of a variable to make sure that the function?
ForestPoem last edited by ForestPoem
This post is deleted!
I don't really get what you want to do. Do you want to connect a signal to a slot in the same class (this is possible)?
What do you mean by "keep a thread"?
Signals cannot be static.
One more comment: you do not define a signal, you only declare it in your class (the body of the signal is created by the moc meta compiler). So, this is wrong:
QMetaObject::activate(this, &staticMetaObject, 0, 0);
Want to send a signal to the other classes.
@ForestPoem Then declare the signal in the class which is going to emit this signal. Create an instance of this class and connect the signals to the slots of all the other instances of other classes.
Is there a special reason why you wanted a static signal?
To use a static function. Coding in the B class A class when you try to use the function.
Well, you can call the static method in a non static slot :-)
@jsulm Then change the value property to determine the signal or event that occurs?
@ForestPoem In the slot you know which signal was emitted (the one you connected it to), you can even get the pointer to the object which emitted the signal using sender()