您的位置:首页 > 其它

Restrict the resize the height of QWizard page which has watermark picture

2016-12-04 18:17 465 查看
In Qt 4.6 version, all the pages of QWizard can be resized freely even if the first page has watermark picture, this causes there is some space between the watermark and the buttons below after manually expanding the page, this definitely looks bad. Here
is a workaround to avoid the issue, connect a slot to currentIdChanged() signal and implement the slot as below:

 void onPageIdChanged(int id)

{

if (id ==0) {

setMaximumHeight(page(id)->layout()->totalSizeHint().height());

}

else {

setMaximumHeight(QWIDGETSIZE_MAX);

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐