Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unknown typename "listWidget" did you mean "QListWidget"
Qt 6.11 is out! See what's new in the release blog

Unknown typename "listWidget" did you mean "QListWidget"

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    venkatesh
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      you should post the code where you use listWidget class.

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

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved