我使用了QHBoxLayout,然后想让layout中的控件显示在指定的位置
代码如下:
layout = new QHBoxLayout(this);
layout->setGeometry(QRect(10, 30, 620, 15));
startButton = new QPushButton(tr("Start"), this);
pauseButton = new QPushButton(tr("Pause"), this);
layout->addWidget(startButton);
layout->addWidget(pauseButton);
但是上面的setGeometry貌似没有用,layout仍然显示在widget的中间位置,有谁能指点下怎样实现在指定的位置显示QHBoxLayout?