forked from qt-creator/qt-creator
Fixes: - Cancel button and default button for wizards on Mac
This commit is contained in:
@@ -44,6 +44,8 @@ FileWizardDialog::FileWizardDialog(QWidget *parent) :
|
|||||||
m_filePage(new FileWizardPage)
|
m_filePage(new FileWizardPage)
|
||||||
{
|
{
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
setOption(QWizard::NoCancelButton, false);
|
||||||
|
setOption(QWizard::NoDefaultButton, false);
|
||||||
setPixmap(QWizard::WatermarkPixmap, QPixmap(QLatin1String(":/qworkbench/images/qtwatermark.png")));
|
setPixmap(QWizard::WatermarkPixmap, QPixmap(QLatin1String(":/qworkbench/images/qtwatermark.png")));
|
||||||
addPage(m_filePage);
|
addPage(m_filePage);
|
||||||
connect(m_filePage, SIGNAL(activated()), button(QWizard::FinishButton), SLOT(animateClick()));
|
connect(m_filePage, SIGNAL(activated()), button(QWizard::FinishButton), SLOT(animateClick()));
|
||||||
|
|||||||
@@ -509,6 +509,8 @@ QPixmap BaseFileWizard::watermark()
|
|||||||
void BaseFileWizard::setupWizard(QWizard *w)
|
void BaseFileWizard::setupWizard(QWizard *w)
|
||||||
{
|
{
|
||||||
w->setPixmap(QWizard::WatermarkPixmap, watermark());
|
w->setPixmap(QWizard::WatermarkPixmap, watermark());
|
||||||
|
w->setOption(QWizard::NoCancelButton, false);
|
||||||
|
w->setOption(QWizard::NoDefaultButton, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseFileWizard::postGenerateFiles(const GeneratedFiles &l, QString *errorMessage)
|
bool BaseFileWizard::postGenerateFiles(const GeneratedFiles &l, QString *errorMessage)
|
||||||
|
|||||||
Reference in New Issue
Block a user