Hi,
Just when I call this:
QDefectItem *item = new QDefectItem();
QDefectItem *item = new QDefectItem();
To copy to clipboard, switch view to plain text mode
I also get an error when calling "isEnabled()"
#ifndef QDEFECTITEM_H
#define QDEFECTITEM_H
#include <QGraphicsEllipseItem>
{
Q_OBJECT
public:
QDefectItem();
~QDefectItem();
private slots:
void enabledChg();
signals:
void itemSelected(QDefectItem*);
};
#endif // QDEFECTITEM_H
#ifndef QDEFECTITEM_H
#define QDEFECTITEM_H
#include <QGraphicsEllipseItem>
class QDefectItem : public QGraphicsObject, public QGraphicsEllipseItem
{
Q_OBJECT
public:
QDefectItem();
~QDefectItem();
private slots:
void enabledChg();
signals:
void itemSelected(QDefectItem*);
};
#endif // QDEFECTITEM_H
To copy to clipboard, switch view to plain text mode
#include "QDefectItem.h"
QDefectItem::QDefectItem()
{
//connect(this,SIGNAL(enabledChanged()),this,SLOT(enabledChg()));
}
QDefectItem::~QDefectItem()
{
}
void QDefectItem::enabledChg()
{
//here there is another error
if (isEnabled()) //error C2358:"ambiguous acces to isEnabled()" and error C3861:"isEnabled identifier not found"
emit itemSelected(this);
}
#include "QDefectItem.h"
QDefectItem::QDefectItem()
{
//connect(this,SIGNAL(enabledChanged()),this,SLOT(enabledChg()));
}
QDefectItem::~QDefectItem()
{
}
void QDefectItem::enabledChg()
{
//here there is another error
if (isEnabled()) //error C2358:"ambiguous acces to isEnabled()" and error C3861:"isEnabled identifier not found"
emit itemSelected(this);
}
To copy to clipboard, switch view to plain text mode
Bookmarks