问题
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