N
N
Nik872020-04-20 13:00:36
Qt
Nik87, 2020-04-20 13:00:36

What is the best way to implement an image markup application in pyqt?

Hello. I'm just learning QT. You need to implement an image markup application. While implemented such algorithm. I create a form by inheriting from QMainWindow. I create a QLabel and set it to a QScrollArea. QScrollArea I set on the form. With the help of getOpenFileName I get the file name and load it into the QLabel. The question is how to implement the mouse selection of areas on the image so that they can be further manipulated (move, etc.) on this image and refer to these areas when selecting with the mouse? Moreover, it is desirable to store these areas in a list or other container.

Or maybe there is another approach for such an implementation5e9d72904be20997647965.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bbkmzzzz, 2020-04-20
@bbkmzzzz

The first thing that came to mind.
Track the mouse click -> remember -> draw, for example, a QFrame with a frame -> resize when the mouse moves -> remember the frame size when the mouse is released (the coordinate of the mouse click is already there) -> anything else

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question