41 #include <QApplication>
42 #include <QScrollArea>
43 #include <QGridLayout>
53 int main(
int argc,
char** argv)
55 QApplication app(argc, argv);
57 QWidget* w =
new QWidget();
89 QStringList enumNames;
90 enumNames <<
"Up" <<
"Right" <<
"Down" <<
"Left";
92 QMap<int, QIcon> enumIcons;
93 enumIcons[0] = QIcon(
":/demo/images/up.png");
94 enumIcons[1] = QIcon(
":/demo/images/right.png");
95 enumIcons[2] = QIcon(
":/demo/images/down.png");
96 enumIcons[3] = QIcon(
":/demo/images/left.png");
101 intManager->
setRange(item9, -100, 100);
138 QScrollArea* scroll3 =
new QScrollArea();
139 scroll3->setWidgetResizable(
true);
140 scroll3->setWidget(editor3);
154 QScrollArea* scroll4 =
new QScrollArea();
155 scroll4->setWidgetResizable(
true);
156 scroll4->setWidget(editor4);
170 QScrollArea* scroll5 =
new QScrollArea();
171 scroll5->setWidgetResizable(
true);
172 scroll5->setWidget(editor5);
174 QGridLayout* layout =
new QGridLayout(w);
175 QLabel* label1 =
new QLabel(
"Editable Tree Property Browser");
176 QLabel* label2 =
new QLabel(
"Read Only Tree Property Browser, editor factories are not set");
177 QLabel* label3 =
new QLabel(
"Group Box Property Browser");
178 QLabel* label4 =
new QLabel(
"Group Box Property Browser with different editor factories");
179 QLabel* label5 =
new QLabel(
"Button Property Browser");
180 label1->setWordWrap(
true);
181 label2->setWordWrap(
true);
182 label3->setWordWrap(
true);
183 label4->setWordWrap(
true);
184 label5->setWordWrap(
true);
185 label1->setFrameShadow(QFrame::Sunken);
186 label2->setFrameShadow(QFrame::Sunken);
187 label3->setFrameShadow(QFrame::Sunken);
188 label4->setFrameShadow(QFrame::Sunken);
189 label5->setFrameShadow(QFrame::Sunken);
190 label1->setFrameShape(QFrame::Panel);
191 label2->setFrameShape(QFrame::Panel);
192 label3->setFrameShape(QFrame::Panel);
193 label4->setFrameShape(QFrame::Panel);
194 label5->setFrameShape(QFrame::Panel);
195 label1->setAlignment(Qt::AlignCenter);
196 label2->setAlignment(Qt::AlignCenter);
197 label3->setAlignment(Qt::AlignCenter);
198 label4->setAlignment(Qt::AlignCenter);
199 label5->setAlignment(Qt::AlignCenter);
201 layout->addWidget(label1, 0, 0);
202 layout->addWidget(label2, 0, 1);
203 layout->addWidget(label3, 0, 2);
204 layout->addWidget(label4, 0, 3);
205 layout->addWidget(label5, 0, 4);
206 layout->addWidget(editor1, 1, 0);
207 layout->addWidget(editor2, 1, 1);
208 layout->addWidget(scroll3, 1, 2);
209 layout->addWidget(scroll4, 1, 3);
210 layout->addWidget(scroll5, 1, 4);
213 int ret = app.exec();