[Qt-creator] Q_ENUMS availability bug/enhancement ?
VStevenP
vstevenpavao at yahoo.com
Tue Apr 23 21:11:10 CEST 2013
I am working on a project in which there are 2 applications that communicate with each other, and they need to share some enums.
One of these apps is a Qt Quick 2 application, which is the user interface app. The other is a backend application which provides some data acquisition, etc. They may possibly run on different CPUs.
I am trying to share enums in a clean way between the apps by including the enum, but unfortunately, Qt Creator does not detect the enum in the included file. Is there something I can do to make this work, so that if I type "Test." in Qt Creator Editor, it will give me the list of enum values from the included file?
#pragmaonce
#include<QObject>
#include<QtQml>
classTest:publicQObject{
Q_OBJECT
Q_ENUMS(ParameterId)
public:
#include"TestParameters.h"
explicitTest(QObject*parent=0);
virtual~Test();
};
QML_DECLARE_TYPE(Test)
Note that if I instead place the enum at the location of the "#include TestParameters.h" rather than inside that included file, QtCreator will detect the enum and show it in auto-complete.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20130423/bd22ffab/attachment.html>
More information about the Qt-creator
mailing list