F
F
FreezkoS2017-10-15 16:43:56
Qt
FreezkoS, 2017-10-15 16:43:56

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

1 answer(s)
S
Stanislav Makarov, 2017-10-15
@Nipheris

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 question

Ask a Question

731 491 924 answers to any question