本文整理汇总了C++中QProgressBar::setInvertedAppearance方法的典型用法代码示例。如果您正苦于以下问题:C++ QProgressBar::setInvertedAppearance方法的具体用法?C++ QProgressBar::setInvertedAppearance怎么用?C++ QProgressBar::setInvertedAppearance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QProgressBar
的用法示例。
在下文中一共展示了QProgressBar::setInvertedAppearance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
Spectrum::Spectrum(QMap<QString, unsigned int> answerCount, QWidget *parent) :
QWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QLabel *title = new QLabel(tr("Spectre"));
title->setAlignment(Qt::AlignCenter);
mainLayout->addWidget(title);
QHBoxLayout *extraversionIntroversionLayout = new QHBoxLayout;
mainLayout->addLayout(extraversionIntroversionLayout);
QLabel *extraversion = new QLabel(tr("Extraversion"));
extraversion->setMinimumWidth(100);
extraversion->setAlignment(Qt::AlignRight);
extraversionIntroversionLayout->addWidget(extraversion);
QProgressBar *extraversionProgressBar = new QProgressBar;
extraversionProgressBar->setInvertedAppearance(true);
extraversionProgressBar->setMaximum(10);
extraversionIntroversionLayout->addWidget(extraversionProgressBar);
QProgressBar *introversionProgressBar = new QProgressBar;
introversionProgressBar->setMaximum(10);
extraversionIntroversionLayout->addWidget(introversionProgressBar);
QLabel *introversion = new QLabel(tr("Introversion"));
introversion->setMinimumWidth(100);
extraversionIntroversionLayout->addWidget(introversion);
QHBoxLayout *sensingIntuitionLayout = new QHBoxLayout;
mainLayout->addLayout(sensingIntuitionLayout);
QLabel *sensing = new QLabel(tr("Sensation"));
sensing->setMinimumWidth(100);
sensing->setAlignment(Qt::AlignRight);
sensingIntuitionLayout->addWidget(sensing);
QProgressBar *sensingProgressBar = new QProgressBar;
sensingProgressBar->setInvertedAppearance(true);
sensingProgressBar->setMaximum(20);
sensingIntuitionLayout->addWidget(sensingProgressBar);
QProgressBar *intuitionProgressBar = new QProgressBar;
intuitionProgressBar->setMaximum(20);
sensingIntuitionLayout->addWidget(intuitionProgressBar);
QLabel *intuition = new QLabel(tr("Intuition"));
intuition->setMinimumWidth(100);
sensingIntuitionLayout->addWidget(intuition);
QHBoxLayout *thinkingFeelingLayout = new QHBoxLayout;
mainLayout->addLayout(thinkingFeelingLayout);
QLabel *thinking = new QLabel(tr("Pensée"));
thinking->setAlignment(Qt::AlignRight);
thinking->setMinimumWidth(100);
thinkingFeelingLayout->addWidget(thinking);
QProgressBar *thinkingProgressBar = new QProgressBar;
thinkingProgressBar->setInvertedAppearance(true);
thinkingProgressBar->setMaximum(20);
thinkingFeelingLayout->addWidget(thinkingProgressBar);
QProgressBar *feelingProgressBar = new QProgressBar;
feelingProgressBar->setMaximum(20);
thinkingFeelingLayout->addWidget(feelingProgressBar);
QLabel *feeling = new QLabel(tr("Sentiment"));
feeling->setMinimumWidth(100);
thinkingFeelingLayout->addWidget(feeling);
QHBoxLayout *judgingPerceptionLayout = new QHBoxLayout;
mainLayout->addLayout(judgingPerceptionLayout);
QLabel *judging = new QLabel(tr("Jugement"));
judging->setAlignment(Qt::AlignRight);
judging->setMinimumWidth(100);
judgingPerceptionLayout->addWidget(judging);
QProgressBar *judgingProgressBar = new QProgressBar;
judgingProgressBar->setInvertedAppearance(true);
judgingProgressBar->setMaximum(20);
judgingPerceptionLayout->addWidget(judgingProgressBar);
QProgressBar *perceptionProgressBar = new QProgressBar;
perceptionProgressBar->setMaximum(20);
judgingPerceptionLayout->addWidget(perceptionProgressBar);
QLabel *perception = new QLabel(tr("Perception"));
perception->setMinimumWidth(100);
judgingPerceptionLayout->addWidget(perception);
QLabel *result = new QLabel(tr("Resultat"));
result->setAlignment(Qt::AlignCenter);
mainLayout->addWidget(result);
QHBoxLayout *resultLayout = new QHBoxLayout;
mainLayout->addLayout(resultLayout);
//search result, if there is equal result, we have to
//set several button.
QList<QString> firstLetters;
if (answerCount["extraversion"] < answerCount["introversion"]) {
firstLetters.append("I");
} else if (answerCount["extraversion"] > answerCount["introversion"]) {
firstLetters.append("E");
} else {
firstLetters.append("I");
firstLetters.append("E");
//.........这里部分代码省略.........