PDA

View Full Version : Cant recover enum information for Qstyle ?



tonnot
14th October 2011, 10:02
Following instructions I have found at http://labs.qt.nokia.com/2008/10/09/coding-tip-pretty-printing-enum-values/
I want to know what PixelMetric are asking me the app.
So first I write

QMetaObject meta = QStyle::staticMetaObject;
But.... I have 0 enumeratorCount

qDebug()<<meta.enumeratorCount();
So it is imposible to use the next step, to

for (int i=0; i < meta.enumeratorCount(); ++i) {
QMetaEnum m = meta.enumerator(i);
if m.name() == "....."


Any idea to solve this? I want to see the 'literal' string of the pixelmetrics values asked for the app.
Thanks

wysota
14th October 2011, 10:57
Don't use QMetaEnum, resolve the enums yourself.