![]() I wanted to know how,where, when, why to apply this emit() pseudo -keyword. Some said its a syntactic sugar, some said there is a moc -object that works with emit(). This is the perfect blog article for you: ![]() However, this "emit" pseudo-keyword is really confusing for novice guy like me. is my interpretation correct? if yes, why still to implement "emit valueChanged(value) " in the SLOT function ? else please correct my interpretation. valueChanged() this function will "track" has "m_value" changed to new value yet? If yes, then "send" the signal to the setValue this SLOT to perform operation. QObject::connect(&a, SIGNAL(valueChanged(int)),Ī.setValue(12) // a.value() = 12, b.value() = 12ī.setValue(48) // a.value() = 12, b.value() = 48įrom what i understand from that code. Perhaps we can start with the example provided in the documentation. ![]() So far, I have already understood the signal and slots on high level abstraction. Hi, I have gone through the documentation, and spent some times to understand how is the magic work between signal and slots.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |