I want to draw a rectangle from the center of it like the below situation.
The image of rectangle:

painter.rectMode(Center)
painter.drawRect(x, y, w, h)
How I can do that task?
I want to draw a rectangle from the center. Please help me.
I want to draw a rectangle from the center of it like the below situation.
The image of rectangle:

painter.rectMode(Center)
painter.drawRect(x, y, w, h)
How I can do that task?
I want to draw a rectangle from the center. Please help me.
Copyright © 2021 Jogjafile Inc.
It is a simple geometry calculus that can handle by a simple function
The window will look like this.