Solved MOC file compile error: expected unqualified-id before int
-
Hi all ,
I'm trying to build NVIDIA's SceniX 7.3 Viewer with Qt 5.7 while it was originally written to support Qt 4.7. All main source files were compiled successfully when the build stopped at moc_ColorPickerWidget.cpp :
screenshot1: https://www.imageupload.co.uk/image/BP8N
screenshot2: https://www.imageupload.co.uk/image/BP8shere's corresponding part of ColorPickerWidget.h:
// ===================================================== class ColorPickerRegion : public SceniXQGLWidget { Q_OBJECT public: ColorPickerRegion(QWidget *parent, const nvgl::RenderContextGLFormat &format, SceniXQGLWidget *shareWidget); public slots: void setColor(int hue, int sat, int val, int red, int green, int blue); void setAxisHue(bool checked); void setAxisSat(bool checked); void setAxisVal(bool checked); void setAxisRed(bool checked); void setAxisGreen(bool checked); void setAxisBlue(bool checked); signals: void colorChanged(int hue, int sat, int val, int red, int green, int blue); protected: virtual void initializeGL(); virtual void paintGL(); virtual void resizeGL(int width, int height); virtual void mouseMoveEvent(QMouseEvent *event); virtual void mousePressEvent(QMouseEvent *event); void updateColor(float x, float y); private: void renderQuad(const nvmath::Vec3f colors[4]); void renderCrossHair(float x, float y, const nvmath::Vec3f colors[4]); int m_hue; int m_sat; int m_val; int m_red; int m_green; int m_blue; ColorPickerAxis m_axis; }; // =====================================================
Please notice that Qt Creator doesn't highlight known types - uint, QMetaType::Void etc.
As I don't have much experience with Qt could someone, please, tell me what's wrong there ?
Thanks
-
Hi! Maybe this helps: https://forum.qt.io/topic/41817
-
Hi Wieland
Thanks for speedy reply.
Just tried out that workaround and it worked . moc_ColorPickerWidget.cpp was compiled but the size of moc_ColorPickerWidget.o looks a bit suspicious - 10.3MiB ! Now I have to find out if compiled object file is valid but at list now it makes sense to me what's wrong .Again thanks.
-
SceniX 7.3 was successfully built with Qt 5.7 !
Please , mark this topic as solved.
Regards -
Great! :-)