Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.9.2
-
None
-
IDE版本是 Qt Creator 4.4.1
Qt版本是 5.9.2
Description
I add a verticalLayout to UI, and then calculate the QRect value of this region with the following code
QRect rc=ui->verticalLayout->geometry();
Then, I found that the QRect's top and left did not contain Toolbar's width and height.
So now I can only correct the wrong QRect with the following code:
QRect rc=ui->verticalLayout->geometry();
QRect rcMain=ui->centralWidget->geometry();
rc.setLeft(rc.left()+rcMain.left());
rc.setTop(rc.top()+rcMain.top());
rc.setRight(rc.right()+rcMain.left());
rc.setBottom(rc.bottom()+rcMain.top());