How to draw a line over widget in Qt5

Viewed 3511

I have a mainwindow and more than two widget on mainwindow. I wanna draw lines on the whole mainwindow and when the line should be over the widgets not behind these widgets. I've tried overwrite paintevent function of mainwindow and draw a line directly but the line is behind widgets. What should I do?

1 Answers
Related