91 tbw = new QTabWidget(this); |
91 tbw = new QTabWidget(this); |
92 pageLayout->addWidget(tbw, 1, 0, 1, 4); // span 4 columns |
92 pageLayout->addWidget(tbw, 1, 0, 1, 4); // span 4 columns |
93 // let's not make the tab widget use more space than needed |
93 // let's not make the tab widget use more space than needed |
94 tbw->setFixedWidth(400); |
94 tbw->setFixedWidth(400); |
95 pageLayout->setAlignment(tbw, Qt::AlignHCenter); |
95 pageLayout->setAlignment(tbw, Qt::AlignHCenter); |
|
96 |
|
97 QString style = "QListWidget { border-style: none; padding-top: 6px; } QListWidget::item { padding-top: 2px; padding-bottom: 2px; }"; |
96 |
98 |
97 tbw->setStyleSheet("QListWidget { border-style: none; padding-top: 6px; }"); |
|
98 |
|
99 // training/challenge/scenario lists |
99 // training/challenge/scenario lists |
100 lstTrainings = new QListWidget(this); |
100 lstTrainings = new QListWidget(this); |
101 lstTrainings ->setWhatsThis(tr("Pick the training to play")); |
101 lstTrainings ->setWhatsThis(tr("Pick the training to play")); |
|
102 lstTrainings->setStyleSheet(style); |
102 |
103 |
103 lstChallenges = new QListWidget(this); |
104 lstChallenges = new QListWidget(this); |
104 lstChallenges ->setWhatsThis(tr("Pick the challenge to play")); |
105 lstChallenges ->setWhatsThis(tr("Pick the challenge to play")); |
|
106 lstChallenges->setStyleSheet(style); |
105 |
107 |
106 lstScenarios= new QListWidget(this); |
108 lstScenarios= new QListWidget(this); |
107 lstScenarios->setWhatsThis(tr("Pick the scenario to play")); |
109 lstScenarios->setWhatsThis(tr("Pick the scenario to play")); |
|
110 lstScenarios->setStyleSheet(style); |
108 |
111 |
109 tbw->addTab(lstTrainings, tr("Trainings")); |
112 tbw->addTab(lstTrainings, tr("Trainings")); |
110 tbw->addTab(lstChallenges, tr("Challenges")); |
113 tbw->addTab(lstChallenges, tr("Challenges")); |
111 tbw->addTab(lstScenarios, tr("Scenarios")); |
114 tbw->addTab(lstScenarios, tr("Scenarios")); |
112 tbw->setCurrentWidget(lstTrainings); |
115 tbw->setCurrentWidget(lstTrainings); |