| 21 |
|
this->myWizard->setWindowIcon(QIcon(":/new/icons/sound.png")); |
| 22 |
|
|
| 23 |
|
//Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/) |
| 24 |
+ |
#ifdef Q_WS_WIN |
| 25 |
|
this->myWizard->resize(640,480); |
| 26 |
+ |
#else |
| 27 |
+ |
this->myWizard->resize(800,600); // Mac OS pcs should be able to render this resolution without any problem. It's also better |
| 28 |
+ |
// because the components on mac use more space |
| 29 |
+ |
#endif |
| 30 |
|
QRect position = this->myWizard->frameGeometry(); |
| 31 |
|
position.moveCenter(QDesktopWidget().availableGeometry().center()); |
| 32 |
|
this->myWizard->move(position.topLeft()); |
| 78 |
|
// Last page? |
| 79 |
|
if(pageId==4){ |
| 80 |
|
this->myWizard->setOption(QWizard::HaveCustomButton1, true); // set visible |
| 81 |
+ |
this->myWizard->button(QWizard::BackButton)->setEnabled(false); // disable back button, use restart if needed |
| 82 |
|
return; |
| 83 |
|
} |
| 84 |
|
this->myWizard->setOption(QWizard::HaveCustomButton1, false); // set invisible |
| 85 |
+ |
this->myWizard->button(QWizard::BackButton)->setEnabled(true); // set enable back button |
| 86 |
|
} |