0

I think I have made a big mistake. QtCreater does not recognize QStandardItemModel anymore, I highlighted QStandardItemModel, and hit "Refactor" -> "rename Symbol under cursor" and renamed it QAbstractItemModel. With the intention of refacting whatever was named QStandardItemModel with QAbstractItemModel in the class, like you can do in eclipse. I seem to have done more however.

Any suggestions on how to fix this :(

Here is a snippet;

#ifndef LISTMANAGER_H
#define LISTMANAGER_H
#include <QString>
#include <QList>
#include <QStandardItemModel>


    class listManager: QObject
    {
        Q_OBJECT
    public:
        listManager();
        listManager(QList<QString> list);
        QAbstractItemModel* listManager::getmodelview();
        QAbstractItemModel* listManager::getclassmodelView();
    public:
        QStandardItemModel *courseModel = new QStandardItemModel(0,0);
        QStandardItemModel *classModel = new QStandardItemModel(0,0);

    };

    #endif // LISTMANAGER_H

QStandardItemModel stays black and dosent turn purple, meaning it hasn't been recognized by the compiler.

There is an output of around 80 errors, most of them internal qstandarditemmode, or qabstractitemodel errors.

user4217633
  • 71
  • 3
  • 10

1 Answers1

0

I un-installed Qt Creator, restarted and re-installed. I can use QStandardItemModel again.

user4217633
  • 71
  • 3
  • 10
  • That's overkill...O_O, Isn't there any easier way? – Tay2510 Nov 10 '14 at 07:47
  • I guess not lol, I was hoping someone else had a solution on here. I am not very familiar with Qt Creator. – user4217633 Nov 10 '14 at 08:06
  • i might be wrong, but i dont think pointer assignments are valid in class declaration. and maybe the lang parser was confused with the unneccesary indirection `listManager::...` – Zaiborg Nov 10 '14 at 10:32
  • that is probably not the easiest way to fix your error. But whatever. –  Nov 29 '14 at 06:17