本文整理汇总了C++中QWizard::setWizardStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ QWizard::setWizardStyle方法的具体用法?C++ QWizard::setWizardStyle怎么用?C++ QWizard::setWizardStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWizard
的用法示例。
在下文中一共展示了QWizard::setWizardStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: actionWizard
void QEbuMainWindow::actionWizard()
{
QWizard *wizard = new QWizard(this);
wizard->setWindowTitle(QObject::tr("Getting started"));
wizard->setWizardStyle(QWizard::ModernStyle);
wizard->adjustSize();
// INTRO
QWizardPage *intro = new QWizardPage;
{
intro->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark.png"));
intro->setTitle(QObject::tr("Introduction"));
QVBoxLayout *layout = new QVBoxLayout;
QLabel *label = new QLabel(QObject::tr("This brief tutorial will give an overview "
"of the main components of the editor and their "
"meaning. A couple of aspects of the GUI are pointed out "
"in every page and small insight is given about the most "
"relevant elements."));
label->setWordWrap(true);
layout->addWidget(label);
intro->setLayout(layout);
}
// FIRST PAGE - Basic Layout Description I
// Breadcrumb
// Grouping attributes/elements
QWizardPage *page1 = new QWizardPage;
{
page1->setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png").scaled(560, 49, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
page1->setTitle(QObject::tr("Basic Layout I"));
page1->setSubTitle(QObject::tr("Breadcrumb and grouping"));
QVBoxLayout *layout = new QVBoxLayout;
QLabel *image = new QLabel;
image->setPixmap(QPixmap(":/images/page0.png"));
image->setAlignment(Qt::AlignHCenter);
QLabel *firstParagraph = new QLabel("(1) A simple to read breadcrumb at the top of each page will help you remember at which level of the tree you are");
firstParagraph->setWordWrap(true);
QLabel *secondParagraph = new QLabel("(2) All the fields within a form are grouped together, or at least sorted in a meaningful way. For any given types all the attributes are stacked at the top of the page, whereas inner elements occupy lower positions.");
secondParagraph->setWordWrap(true);
layout->addWidget(image);
layout->addWidget(firstParagraph);
layout->addWidget(secondParagraph);
page1->setLayout(layout);
}
// SECOND PAGE - Basic Layout Description II
// [0..1]
// TAB
QWizardPage *page2 = new QWizardPage;
{
page2->setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png").scaled(560, 49, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
page2->setTitle(QObject::tr("Basic Layout II"));
page2->setSubTitle(QObject::tr("Simple elements and Tabs"));
QVBoxLayout *layout = new QVBoxLayout;
QLabel *image = new QLabel;
image->setPixmap(QPixmap(":/images/page1.png"));
image->setAlignment(Qt::AlignHCenter);
QLabel *firstParagraph = new QLabel("(1) Inner elements with cardinality of [0..1] are hadlled with a couple of buttons to add the element, or edit the existing one, and to remove it. An immutable edit box gives a direct feedback of the status of said element.");
firstParagraph->setWordWrap(true);
QLabel *secondParagraph = new QLabel("(2) To have a nicer and tidier appearence, in case of very rich panels, the content is divided among several tabs, with the aim to keep together correlated elements.");
secondParagraph->setWordWrap(true);
layout->addWidget(image);
layout->addWidget(firstParagraph);
layout->addWidget(secondParagraph);
page2->setLayout(layout);
}
// THIRD PAGE - Basic Layout Description III
// The Amazing ListView
// Mention to New Form vs Simple Dialog
QWizardPage *page3 = new QWizardPage;
{
page3->setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png").scaled(560, 49, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
page3->setTitle(QObject::tr("Basic Layout III"));
page3->setSubTitle(QObject::tr("Listview"));
QVBoxLayout *layout = new QVBoxLayout;
QLabel *image = new QLabel;
image->setPixmap(QPixmap(":/images/page2.png"));
image->setAlignment(Qt::AlignHCenter);
QLabel *firstParagraph = new QLabel("In case of inner elements with [0..*] cardinality a custom list manager is provided, to manage the contents.");
firstParagraph->setWordWrap(true);
QLabel *secondParagraph = new QLabel("In presence of both single and multiple cardinality elements within the same form, to keep a coherent appearence all the items are managed with the proposed list view, that automatically forbids the insertion of more than one element, if needed.");
secondParagraph->setWordWrap(true);
layout->addWidget(image);
layout->addWidget(firstParagraph);
layout->addWidget(secondParagraph);
page3->setLayout(layout);
}
// FOURTH PAGE - Dates & Numbers
// Optional fields
// Checkboxes
// Compliance Check
QWizardPage *page4 = new QWizardPage;
//.........这里部分代码省略.........