Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

PyQt How to make an image processing GUI?



  • I am trying to make an image processing GUI.I need some function like image rotate, pen, ruler, protractor, and zoom in/out.
    79c3996c-32d8-4d18-b0fa-daa709ab7637-image.png
    I am now using QPainter drawpixmap to show the picture, and override mousePressEvent/mouseReleaseEvent/mouseMoveEvent to get my mouse locus.
    And here is the problem, when I rotate the coordinate was't change with rotate, my mouse click will be wrong. I use a Linear matrix to get what I really want.But I think my method is kind of stupid, I wonder whether there is a good way to deal with it, or a standard SOP to do this.
    Also I use a list to store all my ruler's line, is there a efficient way to manage this line draw by user. I want to delete it one by one, not all in one time(Now I can only delete them all in one time)


Log in to reply