I am at a dead end, I do not know how to implement our plans. I have a QLable in QLable. This case is a map. The user must click on the map (and not only) to put labels. It can be a round fat point, or there can be some vector small picture. Tags can be added to the map in the right places, and removed from it. Ideally, this should be at least some object, and not just a redraw QPixmap, since it is necessary to push information into this label (at least the tag of this label). The label (after installation on the card) should be sensitive to clicks on it to display the form (if click click) and delete dialog (if click RMB). In addition, the size of the label should be proportionally changed relative to the size of the window. That's why I thought about the vector image, but still did not understand how to apply it. I was still thinking about QPainter, but it just redraws QPixmap, I can’t turn it into a full clickable object with which the user could interact. Can it be possible to position the redrawn QPushButton according to the necessary QLable coordinates? Those. somehow turn the oblong button into a small round red, for example. But this can not imagine how to do it. Maybe someone will be able to suggest or direct thoughts in the right direction. For the work of the program, I have already implemented everything except the labels themselves.

  • one
    You need QGraphicsScene and QGraphicsView . This is a bundle of the scene (i.e., collections) and its graphic display, which allows you to place many graphic elements at once, allowing you to interact with some of them with the mouse and / or keyboard. - ߊߚߤߘ
  • I had difficulties in switching from QLabel to QGraphicsView, so for now I’ll have to postpone the implementation of the labels. ru.stackoverflow.com/q/908818/311899 - FliXis 6:48
  • The version with QGraphicsView does not work for me due to the fact that the image is corrupted, and by itself somehow clumsily working. I even tried to stuff QLabel with a QPixmap inside the scene, but the image is still contorted, apparently due to the use of QGraphicsView. Is there any other solution for labels using QLabel and without using QGraphicsScene and QGraphicsView? Any loophole ... - FliXis
  • one
    In general, inherited from QWidget and in the paintEvent () method implemented drawing a label through QPainter. - FliXis

0