自定义 QWIzard 中的按钮?
QWizard有一些与按钮相关的选项如下:
NoDefaultButton
NoBackButtonOnStartPage
NoBackButtonOnLastPage
DisabledBackButtonOnLastPage
HaveNextButtonOnLastPage
HaveFinishButtonOnEarlyPages
NoCancelButton
CancelButtonOnLeft
HaveHelpButton
HelpButtonOnRight
现在这些选项对我来说还不够,有什么办法可以进行定制吗?
例如,将 QWizardPage 设置为最终页面后,“下一页”按钮仍然存在,因为该页面原本有下一页。
我想要的是将“下一步”更改为“完成”,而不是再增加一个“完成”按钮。
另一个例子是,在第一页,我希望显示“后退”按钮,但被禁用。
如何更灵活地控制这些按钮? 我想让一些按钮消失,一些按钮被禁用。
QWizard have some options related to the buttons as follows:
NoDefaultButton
NoBackButtonOnStartPage
NoBackButtonOnLastPage
DisabledBackButtonOnLastPage
HaveNextButtonOnLastPage
HaveFinishButtonOnEarlyPages
NoCancelButton
CancelButtonOnLeft
HaveHelpButton
HelpButtonOnRight
Now these options are not enough to me, is there any way to do the customization??
For example, after setting a QWizardPage as a final page, the "next" button is still there since the page originally have next page.
What I want is to change "next" to "finish" instead of one more "finish" button.
Another example is that at the first page, I want the "back" button shows up but is disabled.
How can I control these buttons in a more flexible way?
I want make some buttons disappear and some be disabled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用以下
参数调用以下函数:
那么您应该获得指向“下一步”按钮的指针。
剩下要做的唯一一件事就是当您位于最后一页(最后一页之前)时,调用按钮的 setVisible(bool) 函数?
我从来没有这样做过,只是想帮助你。
If you call the follwing function:
with following argument:
then you should get a pointer to the "Next" button.
The only thing left to do is to call setVisible(bool) function of the button when you are one the last but one (pre-last) page?
I have never done this, just tried to help you.