Draw numbers when you're using QgraphicsView and QGraphicsScene
-
Hello friends.
I have in my UI a QGraphicsView in that i am using QGraphicsScene to show a pic. Also, upon the pic i am drawing lines to separate the pic in cells.
However, i have to draw a number when the user click upon the imagen. For example, if you click the first time, in the position i have to draw a number one, with the second time click, i have to draw a number two...
Does someone know how i can do that?
-
Hello friends.
I have in my UI a QGraphicsView in that i am using QGraphicsScene to show a pic. Also, upon the pic i am drawing lines to separate the pic in cells.
However, i have to draw a number when the user click upon the imagen. For example, if you click the first time, in the position i have to draw a number one, with the second time click, i have to draw a number two...
Does someone know how i can do that?
@AdrianCruz http://doc.qt.io/qt-5/qgraphicsview.html
QGraphicsScene scene; scene.addText("Hello, world!"); QGraphicsView view(&scene); view.show();
-
thanks so much! Now is working :)