What is difference between qobject and q_object ?
-
i want to know difference between them. i want know when to use them ?
-
i want to know difference between them. i want know when to use them ?
@Qt-embedded-developer QObject is a C++ class, Q_OBJECT is a macro. If you use this macro in your declaration of a subclass of QObject, it enables Qt's meta-object magic: signals, slots, bindings, meta enums, and meta object information.
class MyClass : public QObject // <- class { Q_OBJECT // <- macro };
-
@Qt-embedded-developer QObject is a C++ class, Q_OBJECT is a macro. If you use this macro in your declaration of a subclass of QObject, it enables Qt's meta-object magic: signals, slots, bindings, meta enums, and meta object information.
class MyClass : public QObject // <- class { Q_OBJECT // <- macro };
-
@sierdzio
How did you guess that OP'sqobject
meantQObject
andq_object
meantQ_OBJECT
? Given what the OP typed for title and that C++ has always been case-significant I did not....@JonB said in What is difference between qobject and q_object ?:
@sierdzio
How did you guess that OP'sqobject
meantQObject
andq_object
meantQ_OBJECT
? Given what the Op typed and that C++ has always been case-significant I did not....I've used some serious deduction magic here :D Was hoping the OP would respond if my heuristic was off.
-
@sierdzio
How did you guess that OP'sqobject
meantQObject
andq_object
meantQ_OBJECT
? Given what the OP typed for title and that C++ has always been case-significant I did not....@JonB said in What is difference between qobject and q_object ?:
QObject
Dear i am talking about QObject vs Q_OBJECT.
sorry for not write correctly .
-
-
@JonB said in What is difference between qobject and q_object ?:
QObject
Dear i am talking about QObject vs Q_OBJECT.
sorry for not write correctly .
@Qt-embedded-developer
I get that now :) It's just so important in C/C++ to write things with their correct capitalization!