Something like that
int main(int argc, char **argv)
{
QPixmap pix
(/*your generated pixmap here*/);
// resize your scene and view to the pix bounding rect
pi->setPos(0,0);
QGraphicsProxyWidget
*lineEdit_item
= scene.
addWidget(new QLineEdit);
// set position and hide/show it when needed
// -> QGraphicsScene::mousePressEvent() and release event...
view.show();
return app.exec();
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QGraphicsScene scene;
QGraphicsView view(&scene);
QPixmap pix(/*your generated pixmap here*/);
QGraphicsPixmapItem *pi = scene.addPixmap(pix);
// resize your scene and view to the pix bounding rect
pi->setPos(0,0);
QGraphicsProxyWidget *lineEdit_item = scene.addWidget(new QLineEdit);
// set position and hide/show it when needed
// -> QGraphicsScene::mousePressEvent() and release event...
view.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks