How to set user data for a QWidget ?

How to set user data for a QWidget ?

Asked on January 10, 2019 in Qt.
Add Comment


  • 2 Answer(s)

    To set user data for a QWidget:

    Just try this link for more informations   QObject::setProperty()  and QWidget

     

     

    Answered on January 10, 2019.
    Add Comment

    Class  inherits from  the QWidget and an integer  type :

    class MyDerivedWidget : public QWidget
    {
        public:
      MyDerivedWidget();
       
        private:
      Data *myUserData;
    };
    

    By using the  setUserData

    Answered on January 10, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.