you never reach this code
...
painter.
drawPixmap(QPoint(10,
10), icon
);
label.setPixmap(pixmap);
label.show();
...
...
QPixmap pixmap("image.png");
QPixmap icon("test.png");
QPainter painter(&pixmap);
painter.drawPixmap(QPoint(10, 10), icon);
QLabel label;
label.setPixmap(pixmap);
label.show();
...
To copy to clipboard, switch view to plain text mode
because return true; is located in a wrong place
try this
bool mouseover()
{
painter.
drawPixmap(QPoint(10,
10), icon
);
label.setPixmap(pixmap);
label.show();
return TRUE;
}
return FALSE;
}
bool mouseover()
{
if(QPoint(10,10)) {
QPixmap pixmap("image.png");
QPixmap icon("test.png");
QPainter painter(&pixmap);
painter.drawPixmap(QPoint(10, 10), icon);
QLabel label;
label.setPixmap(pixmap);
label.show();
return TRUE;
}
return FALSE;
}
To copy to clipboard, switch view to plain text mode
Bookmarks