Thanks for your answer.
Maybe this image can explain my question better:
paint2.jpg
How can I do this using QPainter?Please click on the image (to make it larger), in small version the red line's borders are not visible clearly.
Thanks for your answer.
Maybe this image can explain my question better:
paint2.jpg
How can I do this using QPainter?Please click on the image (to make it larger), in small version the red line's borders are not visible clearly.
Last edited by Awareness; 16th October 2013 at 01:57.
One way i can think of is to have the button embedded in QGraphicsScene as QGraphicsProxyWidget (via QGraphicsScene::addWidget). Then you can draw whatever you want on it with QPainter.
Actually,after I sent my previous message with picture,I thought it was not a good idea to do it like I do it in the picture(at least for my current little project) and I used ChrisW67 's code in his reply,it is working good.But I didn't take my last question back,because I thought I may need the answer in the future and also I wondered if it was possible to do it in Qt.Thank you both ChrisW67 and stampede for your answers.
Bookmarks