Qt World Summit: Register Today!

just curious know. My base class is Qobject. I derive another class from Qobject. can I use the Derive class object in stature?

  • class DataRestore : public QObject {

    mainWindow. h file

    struct InstrumentHandler {
    	typedef struct 
    		RecoveryManage dataMange;
    		DataRestore *recoverChannelStore;
    	bool isItRecoverData = false;
    	RecoveryInfo recoverData;

    can I create member as DataStore object instead of the pointer of the DataStore type?

    if no then, What is Reason behind that?
    note: Data store class is derive from Object.

  • Lifetime Qt Champion


    It depends whether you are going to copy your structure or not. If so, then no, you can't have your QObject based members as just plain members. See why here.

  • @SGaist Thank you sir.

Log in to reply