Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Why is Qt::WFlags not declared?



  • [code]
    #ifndef _DXWIDGET_H
    #define _DXWIDGET_H

    #include <d3dx9.h>

    #include <QtWidgets/qwidget.h>
    #include <QtWidgets/QMainWindow.h>
    #include <QtWidgets/QStatusBar.h>
    #include <QtGui/QResizeEvent>
    #include <QtGui/QVector2D.h>
    #include <QtGui/QVector3D.h>
    #include <QtGui/QVector4D.h>
    #include "../common/common.h"
    #include "../common/camera.h"
    #include "../ui_dxwidget.h"

    class DXWidget : public QWidget {
    Q_OBJECT

    public:
    BT_DECLARE_ALIGNED_ALLOCATOR()

    DXWidget( QWidget *parent = 0, Qt::WFlags flags = 0 ) : QWidget( parent, flags )
    {
            setAttribute(Qt::WA_PaintOnScreen);
            setAttribute(Qt::WA_NoSystemBackground);
    
            m_standBy = false;
            m_lastRendered = 0;
            m_fTime = 0;
            m_camera = (Camera*)_aligned_malloc(sizeof(Camera),16);
            m_camera->initialize();
    }
    

    [/code]

    [code]
    In file included from moc_dxwidget.cpp:9:0:
    GUI/dxwidget.h:32:40: error: 'Qt::WFlags' has not been declared
    DXWidget( QWidget *parent = 0, Qt::WFlags flags = 0 ) : QWidget( parent, flags )
    [/code]

    I am not sure why WFlags is undeclared, seems to be something missing. But not sure of whom
    Thanks
    Jack



  • Okay, I find out it should be WindowFlags instead



  • Good you found it.

    Could you edit the title of your first post and prepend [solved] to it? That way you inform others it's solved already


Log in to reply