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);
}
}
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);
}
}
相关文章推荐
- 'ddlCities' has a SelectedValue which is invalid because it does not exist in the list of items
- Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe
- Question 26: Which of the following options describe the expected overhead for a class that has 5 virtual functions?
- How do I write a LINQ to Entities query which has the equivalent of the SQL “in” keyword?
- ADF_FACES-30108:The view state of the page has expired because of inactivity. Reload the page
- this may be due to a corruption of the heap, which indicates a bug in ... or any of the DLLs it has
- This may be due to a corruption of the heap, which indicates a bug in *.exe or any of the DLLs it has loaded.
- 'ddlXXX' has a SelectedIndex which is invalid because it does not exist in the list of items
- 解决问题The content of the adapter has changed but ListView did not receive a notification.
- 解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
- (NOT CLEAR)Question 18: In the given C++ code snippet, which of the following statements correctly identify how Mon of enum DOW
- uva11292 - The Dragon of Loowater (贪心)
- 2013-9-28 Open the Java build path property page of project
- Question 31: A C++ developer wants to handle a static_cast() operation for the class String shown below. Which of the following
- Question 48: In C++, which of the following statements accurately describe a base class destructor calling a virtual function ov
- SVN E200009 which is not part of the commit; both sides of the move must be committed together
- Compute the height of a binary search tree
- 解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
- The site has prevented deliberating which cheap ghd nz sale
- The Dragon of Loowater UVa 11292(排序后贪心)