forked from qt-creator/qt-creator
Unify wizards with TOC and cancel button.
QTBUG-28385 is biting us over and over (QWizard doesn't have close button nor cancel button on Mac in Qt 5), and actually there's no reason for us having a wizard without the features from Utils::Wizard. Task-number: QTCREATORBUG-10346 Task-number: QTBUG-28385 Change-Id: I80c0d82fe6738496c2ac03c31a1c2757ade8e266 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "wizard.h"
|
||||
#include "hostosinfo.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QHash>
|
||||
@@ -318,6 +319,20 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
|
||||
connect(this, SIGNAL(pageAdded(int)), this, SLOT(_q_pageAdded(int)));
|
||||
connect(this, SIGNAL(pageRemoved(int)), this, SLOT(_q_pageRemoved(int)));
|
||||
setSideWidget(new LinearProgressWidget(d_ptr->m_wizardProgress, this));
|
||||
setOption(QWizard::NoCancelButton, false);
|
||||
setOption(QWizard::NoDefaultButton, false);
|
||||
setOption(QWizard::NoBackButtonOnStartPage, true);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
if (Utils::HostOsInfo::isMacHost()) {
|
||||
setButtonLayout(QList<QWizard::WizardButton>()
|
||||
<< QWizard::CancelButton
|
||||
<< QWizard::Stretch
|
||||
<< QWizard::BackButton
|
||||
<< QWizard::NextButton
|
||||
<< QWizard::CommitButton
|
||||
<< QWizard::FinishButton);
|
||||
}
|
||||
}
|
||||
|
||||
Wizard::~Wizard()
|
||||
|
||||
Reference in New Issue
Block a user