[Qt-creator] Q_ENUMS availability bug/enhancement ?

Orgad Shaneh orgads at gmail.com
Tue Apr 23 21:30:11 CEST 2013


On Tue, Apr 23, 2013 at 10:11 PM, VStevenP <vstevenpavao at yahoo.com> wrote:

> 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?
>
> #pragma once
>
> #include <QObject>
> #include <QtQml>
>
> class Test : public QObject {
>     Q_OBJECT
>     Q_ENUMS(ParameterId)
>
> public:
>     #include "TestParameters.h"
>
>     explicit Test (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.
>
>
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
>
Hi,

Sounds like QTCREATORBUG-8461<https://bugreports.qt-project.org/browse/QTCREATORBUG-8461>
 :)

- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20130423/6e62e7f9/attachment.html>


More information about the Qt-creator mailing list