Hello anyone,
I have a question about QLabel in a RichTextDocument.
I have a label called freesLabel and put a pixmaps on it like this.
QPixmap eca = (QPixmap(":/images/eca.png");
QPixmap ecp = (QPixmap(":/images/ecp.png");
QPixmap erf = (QPixmap(":/images/erf.png");
freeslabel->setPixmap(eca);
freeslabel->setPixmap(ecp);
freeslabel->setPixmap(erf);
Now i want to put this pixmaps into richtextdocument like this.
Normally you must type this line
cursor.insertImage(":/images/eca.png"); or (":/images/ecp.png");
This works ok. but this i don't want.
I want to make a choice what at that moment is on the freesLabel.
I have try
if ( freesLabel == eca) {
cursor.insertImage( eca); }
But this give's a error cannot convert from QPixmap to QLabel.
How make the right code for this.
Thanks in advance.