Can I display/print properties of QWidget?
Hi,
I have a situation where for the first time I receive multitouch events on QDial and then I receive touch event on only on widget. For more info click here
What I want to do is get the state of QWidget (so something similar) when the application starts and then get the state of QWidget when I have touched it once and see what has changed which leads to change in behavior.
Is there any way to do that?
Thanks.
Re: Can I display/print properties of QWidget?
Quote:
What I want to do is get the state of QWidget
Define 'state'.
Re: Can I display/print properties of QWidget?
By state I meant everything about the widget, all the attributes and properties so that I can compare the (state of) widget before and after touch.
Re: Can I display/print properties of QWidget?
Each widget holds all kinds of attributes which you can get through the respective methods, such size() for size, geometry() for geometry and so forth.
Where is the problem?
Re: Can I display/print properties of QWidget?
I am looking for one function that does the job. I guess I will have to get all the attributes individually.
Thanks.
Re: Can I display/print properties of QWidget?
Use meta data, check:
QObject::metaObject
QMetaObject::property
QMetaProperty
You can fetch list of all properties or just list of properties for given class (QMetaObject::propertyOffset).