Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有办法修改按钮后面的面板?我需要改变颜色。还有没有办法删除完成页面上的取消按钮?
删除取消按钮是一种用户体验,不,您应该重新考虑它。如果您坚持做可能是错误的事情:
wizard->setOption(QWizard::NoCancelButton);
您可以从 的重新实现中调用它QWizardPage::initializePage,这样它将在显示页面时删除按钮。
QWizardPage::initializePage
您可以使用样式表来自定义面板的外观。您也可以手动更改其调色板。
我通常通过 CSS 设置固定的列宽,结果完美无瑕:
#tableID thead tr th:nth-child(1){width: 75px;} #tableID thead tr th:nth-child(2){width: 75px;} /* etc… */
但是现在我处于一种情况,直到运行时我才知道所需的列宽。这是我用来动态设置列宽的代码的摘录: