Qt 6.12 LTS is out! See what's new in the release
blog
Draw vertical line at mouse position
-
How can I create a line at the mouse position when I press left click?
I'm trying to figure out how does ponter.DrawLine works but I don't manage to do it and I'm getting a lot of shapes but not what I want.
-
How can I create a line at the mouse position when I press left click?
I'm trying to figure out how does ponter.DrawLine works but I don't manage to do it and I'm getting a lot of shapes but not what I want.
@marcelnitan said in Draw vertical line at mouse position:
ponter.DrawLine
What is that?
To paint on widgets subclass needed Qt widget class and overrid paintEvent and use https://doc.qt.io/qt-6/qpainter.html for painting. To draw a line use https://doc.qt.io/qt-6/qpainter.html#drawLine-2