I want to add a QWidget based class(composed by buttons and labels an so on…) to my QGraphicScene scene in a special position and respecting the graphic style of my scene.?
I am using QT 4.7.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may use QGraphicsScene::addWidget() to add your widget to the scene and use the returned QGraphicsProxyWidget * to reposition your widget with QGraphicsItem::setPos().
Alternatively, you may look into QGraphicsWidget class.