December 16, 2010

ivan.todorovich ivan.todorov..
Lab Rat
96 posts

Can’t Access MetaEnums from QStyle

 

Hi,

I wanted to make a debug application to list and show the QStyle’s StandardPixmaps. So the best way I could think of was iterating through the QMetaEnum “StandardPixmap”. But I found out that QStyle has no Meta information.
Is that right, or I missed something here?

  1.     QStyle *style = this->style();
  2.     qDebug() << style->metaObject()->enumeratorCount();
  3.     qDebug() << style->metaObject()->enumerator(style->metaObject()->indexOfEnumerator("StandardPixmap")).name();

Is there another way to view the list of StandardPixmaps ?

 Signature 

o_o Sorry for my rusted english.

1 reply

December 16, 2010

ivan.todorovich ivan.todorov..
Lab Rat
96 posts

Nevermind, I resolved iterating only on StandardPixmap indexes as int. I can’t show the StandardPixmap’s enum string but it works the same

 Signature 

o_o Sorry for my rusted english.

 
  ‹‹ Without debugging code is not executed ?!?      cut and paste in QPlainTextEdit ››

You must log in to post a reply. Not a member yet? Register here!