에 표시되지 않습니다 아직기능은 내 .H의 범위
#include "imagepixmapitem.h"
#include <QGraphicsSceneWheelEvent>
ImagePixmapItem::ImagePixmapItem(const QPixmap &pixmap, QGraphicsItem *parentItem)
: QGraphicsPixmapItem(pixmap,parentItem)
{
setCacheMode(NoCache);
}
ImagePixmapItem::~ImagePixmapItem()
{
}
void ImagePixmapItem::setSize(qreal size)
{
this->size = size;
}
void wheelEvent (QGraphicsSceneWheelEvent * event){
qreal size = 1.2;
if (event->delta() < 0)
size = 1.0/size;
setSize(size);
}
내가에는 setSize에 오류가 점점 오전 :
내 클래스 파일에서class ImagePixmapItem: public QGraphicsPixmapItem
{
public:
void setSize(qreal size);
private:
qreal size;
};
지금은 두 가지 기능을 가지고 :
../IMViewer/imagepixmapitem.cpp:42 : 오류 : '에는 setSize은'이 범위에서 선언되지 않았습니다 내가 WR를하고있는 중이 야 무엇
여기에?