c++qtqwidget

How to set user data for a QWidget?


I would like to set an integer number to be stored in a QWidget, and I think the setUserData member function would do the trick but I can't find any documentation. Any hints?


Solution

  • You might be looking for QObject::setProperty() (which is of course inherited by QWidget).