Tom Schindl wrote:
> Hi,
> 
> Is there a possibility to restore arbitary data in a QObject or a 
> QWidget. Something like
> 
> QWidget q ....
> q.setUserData(new Integer(0));

If you want to restore a widgets properties between runs of the 
application there are things like QWidget::saveGeometry() and 
QMainWindow::saveState(), like outlined here:

http://doc.trolltech.com/qtjambi-4.4/html/com/trolltech/qt/gui/QMainWindow.html#storing-state

Or did you mean to store arbitrary data? In which case, you could do 
this using a custom property, e.g.

q.setProperty("MyData", new Integer(0));

Integer i = (Integer) q.property("MyData");

best regards,
Gunnar
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to