Answer the question
In order to leave comments, you need to log in
Forming a C++ class?
Hello, there is an implementation of
class Pixmap : public QObject, public QGraphicsPixmapItem
{
Q_OBJECT
Q_PROPERTY(QPointF pos READ pos WRITE setPos)
public:
Pixmap(const QPixmap &pix)
: QObject(), QGraphicsPixmapItem(pix)
{
setCacheMode(DeviceCoordinateCache);
}
};
How to disband this class into declaration and implementation, respectively in *.h and *.cpp
I work in QtCreator
Answer the question
In order to leave comments, you need to log in
The code that in the question needs to be placed in the header, then the body of the constructor should be transferred from the header to the cpp-shnik.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question