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

Image line z-index




  • | \ | | |
    | \ | | |
    | \ | | |
    | \ | | |
    | |\ | |
    | | \ | | \


             what I want                                                                 The problem
    

    I want to put an image on a QMainWindow, and then put a line on the QMainWindow.
    Bu the line is covered by the line. How can I set the z-index of each element?

    NOTE: the image is contained in a QLabel, and I reimplements the paintEvent of the QMainWindow, and the line is presented by QPainter.drawLine in the paintEvent function.


Log in to reply