Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Rotate axis of QWidget
QWidget is by default configured to start the x and y axis in the top left corner. How can I change the axis to start at the bottom left corner (like in maths)?
I basically just want to draw shapes on the QWidget, but it is drawing everything upside-down
kamalakshantv last edited by
In the computer graphics world it starts at the top left corner only. So you will have to make your calculations like that. You can calculate the respective points(x,y) and draw it. I don't know if there is any easier way out.
dangelog last edited by
Apply a transform on the painter.
You want to:
- translate the painter by (0, height())
- reverse the y axis by scaling (1, -1)
thanks, i'll try that
thanx, the translate and scale solution worked