-
Type:
Bug
-
Status: Closed
-
Priority:
P1: Critical
-
Resolution: Invalid
-
Affects Version/s: 5.9.2
-
Fix Version/s: None
-
Component/s: Build tools: uic
-
Labels:None
-
Environment:IDE版本是 Qt Creator 4.4.1
Qt版本是 5.9.2
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());