Unknown typename "listWidget" did you mean "QListWidget"



  • Hi,

    I promoted a QListWidget as a class listWidget but i get a error as mentioned above, i am not sure what's going wrong here.

    listWidget.h
    @

    #ifndef LISTWIDGET_H
    #define LISTWIDGET_H

    #include <QWidget>
    #include<QPixmap>
    #include<QVariant>
    #include<QListWidget>
    #include"ImageRegistrationImplementation.h"
    #include "ui_ImageRegistration.h"

    class listWidget : public QListWidget
    {
    Q_OBJECT
    public:
    explicit listWidget(QWidget *parent = 0);

    };
    #endif // LISTWIDGET_H

    @

    listWidget.cpp

    @
    #include "listWidget.h"
    #include "ui_ImageRegistration.h"
    #include "ImageRegistrationImplementation.h"
    #include <QtGui>
    #include<QVariant>

    listWidget::listWidget(QWidget *parent)
    : QListWidget(parent)
    {
    Ui::ImageRegistration *uiData;
    ImageRegistration *classData=new ImageRegistration();
    ...
    ...
    ...
    ...

    }

    @

    I guess, there is some problem in the way i am accessing th ui files, but i am not clear what's going wrong here.



  • Hi,

    you should post the code where you use listWidget class.

    Also it's very strange the way you include ui_*.h files


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.