Quote Originally Posted by wysota View Post
It has to be declared there because the dock widget class uses it in a property. If it wasn't declared, Designer wouldn't be able to handle it.
I looked at the qdockwidget.h and there is no Q_ENUMS declaration... or do you mean it gets declared because it is used in a property?

I tried:

Qt Code:
  1. const QMetaObject metaObject = QDockWidget::staticMetaObject;
  2. const QMetaEnum metaEnum = metaObject.enumerator(metaObject.indexOfEnumerator("Qt::DockWidgetArea"));
  3. qDebug() "metaObject.isValid() = " << metaObject.isValid(); // false!!!
  4. Qt::DockWidgetArea area = metaEnum.keyToValue("Qt::RightDockWidgetArea"); // -1 (key not found)
To copy to clipboard, switch view to plain text mode 

Any idea what I am doing wrong?

Thanks in advance,
-Jens