QT Installer Framework: Add new wizard page before Introduction page

ぃ、小莉子 提交于 2019-12-13 04:00:05

问题


I want to add new page just before introduction page of QT installer wizard. This page will have image and button. After clicking on button i will ve navigated to introduction page.

Can i do that? I tried but it is not showing. However it does show my page if i add it before other pages (e.g: Target Dir ) Can somebody help me here?


回答1:


As custom pages can be loaded only when components are loaded. And Introduction page launched before any component could be loaded.

So to show your custom page before Introduction page, you need to set the visibility of Introduction page to false.

And then you can show your custom page. Later you could set the visibility of Introduction page to true or just show any other custom Introduction page.

From Controller constructor set visibility of Introduction page to false,

installer.setDefaultPageVisible(QInstaller.Introduction, false);

Now from your root Component constructor add your custom page before Introduction page as below

installer.addWizardPage(component, "DynamicPreIntroPage", QInstaller.Introduction);

I didn't tried, yet it should work.



来源:https://stackoverflow.com/questions/49938162/qt-installer-framework-add-new-wizard-page-before-introduction-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!