|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <ui version="4.0"> |
|
3 <class>MainWindow</class> |
|
4 <widget class="QMainWindow" name="MainWindow"> |
|
5 <property name="geometry"> |
|
6 <rect> |
|
7 <x>0</x> |
|
8 <y>0</y> |
|
9 <width>426</width> |
|
10 <height>413</height> |
|
11 </rect> |
|
12 </property> |
|
13 <property name="windowTitle"> |
|
14 <string>Style Sheet</string> |
|
15 </property> |
|
16 <property name="styleSheet"> |
|
17 <string notr="true">/* Customize any plain widget that is a child of a QMainWindow. */ |
|
18 QMainWindow > .QWidget { |
|
19 background-color: gainsboro; |
|
20 background-image: url(images/pagefold.png); |
|
21 background-position: top right; |
|
22 background-repeat: no-repeat |
|
23 } |
|
24 |
|
25 /* Provide a padding for the layout inside the frame. The frame |
|
26 exists only to provide a padding for the top-right image, so we |
|
27 explicitly disable the border. */ |
|
28 #mainFrame { |
|
29 padding-right: 30px; |
|
30 border-style: none; |
|
31 border-image: none; /* since we set a border-image below */ |
|
32 } |
|
33 |
|
34 /* mainFrame won't have this border-image since we have |
|
35 explicitly set it to 'none' using a more specific selector. */ |
|
36 QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox { |
|
37 border-image: url(images/frame.png) 4; |
|
38 border-width: 3; |
|
39 } |
|
40 |
|
41 QLabel { |
|
42 border: none; |
|
43 border-image: none; |
|
44 padding: 0; |
|
45 background: none; |
|
46 } |
|
47 |
|
48 /* Make text in message boxes selectable. */ |
|
49 QMessageBox { |
|
50 /* LinksAccessibleByMouse | TextSelectableByMouse */ |
|
51 messagebox-text-interaction-flags: 5; |
|
52 } |
|
53 |
|
54 /* Set the selection colors for all widgets. */ |
|
55 QWidget { |
|
56 selection-color: black; |
|
57 selection-background-color: Silver; |
|
58 color: black; |
|
59 } |
|
60 |
|
61 /* Make the entire row selected in item views. */ |
|
62 QAbstractItemView { |
|
63 show-decoration-selected: 1; |
|
64 } |
|
65 |
|
66 /* Nice WindowsXP-style password character for password line edits. */ |
|
67 QLineEdit[echoMode="2"] { |
|
68 lineedit-password-character: 9679; |
|
69 } |
|
70 |
|
71 /* Customize tooltips. */ |
|
72 QToolTip { |
|
73 background-color: rgb(200,200,255); |
|
74 border-color: darkslategray; |
|
75 border-width: 1px; |
|
76 border-style: solid; |
|
77 padding: 3px; |
|
78 font: bold; |
|
79 border-radius: 3px; |
|
80 opacity: 200; |
|
81 } |
|
82 |
|
83 /* Customize radio buttons. */ |
|
84 |
|
85 QRadioButton { |
|
86 spacing: 5px; |
|
87 } |
|
88 |
|
89 QRadioButton::indicator { |
|
90 width: 13px; |
|
91 height: 13px; |
|
92 } |
|
93 |
|
94 QRadioButton::indicator::unchecked { |
|
95 image: url(images/radiobutton_unchecked.png); |
|
96 } |
|
97 |
|
98 QRadioButton::indicator:unchecked:hover { |
|
99 image: url(images/radiobutton_unchecked_hover.png); |
|
100 } |
|
101 |
|
102 QRadioButton::indicator:unchecked:pressed { |
|
103 image: url(images/radiobutton_unchecked_pressed.png); |
|
104 } |
|
105 |
|
106 QRadioButton::indicator::checked { |
|
107 image: url(images/radiobutton_checked.png); |
|
108 } |
|
109 |
|
110 QRadioButton::indicator:checked:hover { |
|
111 image: url(images/radiobutton_checked_hover.png); |
|
112 } |
|
113 |
|
114 QRadioButton::indicator:checked:pressed { |
|
115 image: url(images/radiobutton_checked_pressed.png); |
|
116 } |
|
117 |
|
118 /* Customize arrows. */ |
|
119 |
|
120 *::down-arrow, *::menu-indicator { |
|
121 image: url(images/down_arrow.png); |
|
122 width: 7px; |
|
123 height: 7px; |
|
124 } |
|
125 |
|
126 *::down-arrow:disabled, *::down-arrow:off { |
|
127 image: url(images/down_arrow_disabled.png); |
|
128 } |
|
129 |
|
130 *::up-arrow { |
|
131 image: url(images/up_arrow.png); |
|
132 width: 7px; |
|
133 height: 7px; |
|
134 } |
|
135 |
|
136 *::up-arrow:disabled, *::up-arrow:off { |
|
137 image: url(images/up_arrow_disabled.png); |
|
138 } |
|
139 |
|
140 /* Customize push buttons and comboboxes. Our read-only combobox |
|
141 is very similar to a push button, so they share the same border image. */ |
|
142 |
|
143 QPushButton { |
|
144 min-width: 4em; |
|
145 } |
|
146 |
|
147 QPushButton, QComboBox[editable="false"], |
|
148 QComboBox[editable="true"]::drop-down { |
|
149 border-image: url(images/pushbutton.png) 5; |
|
150 border-width: 5; |
|
151 } |
|
152 |
|
153 QPushButton:hover, QComboBox[editable="false"]:hover, |
|
154 QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover { |
|
155 border-image: url(images/pushbutton_hover.png) 5; |
|
156 border-width: 5; |
|
157 } |
|
158 |
|
159 QPushButton:pressed, QComboBox[editable="false"]:on, |
|
160 QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on { |
|
161 border-image: url(images/pushbutton_pressed.png) 5; |
|
162 border-width: 5; |
|
163 } |
|
164 |
|
165 /* Customize read-only comboboxes. */ |
|
166 |
|
167 QComboBox[editable="false"] { |
|
168 padding-left: 3px; |
|
169 padding-right: 20px; /* space for the arrow */ |
|
170 } |
|
171 |
|
172 QComboBox[editable="false"]::drop-down { |
|
173 subcontrol-origin: padding; |
|
174 subcontrol-position: top right; |
|
175 width: 15px; |
|
176 border-left-style: solid; |
|
177 border-left-color: darkgray; |
|
178 border-left-width: 1px; |
|
179 } |
|
180 |
|
181 QComboBox[editable="false"]::down-arrow { |
|
182 subcontrol-origin: content; |
|
183 subcontrol-position: center; |
|
184 position: relative; |
|
185 left: 1px; /* 1 pixel dropdown border */ |
|
186 } |
|
187 |
|
188 /* The combobox arrow is on when the popup is open. */ |
|
189 QComboBox[editable="false"]::down-arrow:on { |
|
190 position: relative; |
|
191 top: 1px; |
|
192 left: 2px; |
|
193 } |
|
194 |
|
195 /* Customize editable comboboxes. */ |
|
196 |
|
197 QComboBox[editable="true"] { |
|
198 padding-right: 16px; |
|
199 } |
|
200 |
|
201 QComboBox[editable="true"]::drop-down { |
|
202 subcontrol-origin: border; |
|
203 subcontrol-position: top right; |
|
204 width: 13px; |
|
205 position: absolute; |
|
206 top: 2px; |
|
207 bottom: 2px; |
|
208 right: 2px; |
|
209 } |
|
210 |
|
211 QComboBox[editable="true"]::drop-down, |
|
212 QComboBox[editable="true"]::drop-down:hover, |
|
213 QComboBox[editable="true"]::drop-down:on { |
|
214 border-width: 0px; |
|
215 border-left-width: 3px; /* we need only left and center part */ |
|
216 } |
|
217 |
|
218 /* Shift the arrow when it's open. */ |
|
219 QComboBox[editable="true"]::down-arrow:on { |
|
220 position: relative; |
|
221 top: 1px; |
|
222 left: 1px; |
|
223 } |
|
224 |
|
225 /* Customize check boxes. */ |
|
226 QCheckBox { |
|
227 spacing: 5px; |
|
228 } |
|
229 |
|
230 QCheckBox::indicator { |
|
231 width: 13px; |
|
232 height: 13px; |
|
233 } |
|
234 |
|
235 QCheckBox::indicator:unchecked { |
|
236 image: url(images/checkbox_unchecked.png); |
|
237 } |
|
238 |
|
239 QCheckBox::indicator:unchecked:hover { |
|
240 image: url(images/checkbox_unchecked_hover.png); |
|
241 } |
|
242 |
|
243 QCheckBox::indicator:unchecked:pressed { |
|
244 image: url(images/checkbox_unchecked_pressed.png); |
|
245 } |
|
246 |
|
247 QCheckBox::indicator:checked { |
|
248 image: url(images/checkbox_checked.png); |
|
249 } |
|
250 |
|
251 QCheckBox::indicator:checked:hover { |
|
252 image: url(images/checkbox_checked_hover.png); |
|
253 } |
|
254 |
|
255 QCheckBox::indicator:checked:pressed { |
|
256 image: url(images/checkbox_checked_pressed.png); |
|
257 } |
|
258 |
|
259 /* Customize the size grip. */ |
|
260 QSizeGrip { |
|
261 image: url(images/sizegrip.png); |
|
262 width: 16px; |
|
263 height: 16px; |
|
264 } |
|
265 |
|
266 /* Customize the menu bar. */ |
|
267 QMenuBar { |
|
268 border-image: none; |
|
269 border-style: none; |
|
270 border-width: 1px; |
|
271 border-bottom-style: solid; |
|
272 border-bottom-color: darkslategray; |
|
273 padding: 2px; |
|
274 } |
|
275 |
|
276 /* Customize spin boxes. */ |
|
277 |
|
278 QSpinBox { |
|
279 padding-right: 15px; |
|
280 } |
|
281 |
|
282 QSpinBox::up-button { |
|
283 subcontrol-origin: border; |
|
284 subcontrol-position: top right; |
|
285 |
|
286 width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */ |
|
287 border-image: url(images/spinup.png) 1; |
|
288 border-width: 1px; |
|
289 } |
|
290 |
|
291 QSpinBox::up-button:hover { |
|
292 border-image: url(images/spinup_hover.png) 1; |
|
293 } |
|
294 |
|
295 QSpinBox::up-button:pressed { |
|
296 border-image: url(images/spinup_pressed.png) 1; |
|
297 } |
|
298 |
|
299 QSpinBox::down-button { |
|
300 subcontrol-origin: border; |
|
301 subcontrol-position: bottom right; |
|
302 |
|
303 width: 16px; |
|
304 border-image: url(images/spindown.png) 1; |
|
305 border-width: 1px; |
|
306 border-top-width: 0; |
|
307 } |
|
308 |
|
309 QSpinBox::down-button:hover { |
|
310 border-image: url(images/spindown_hover.png) 1; |
|
311 } |
|
312 |
|
313 QSpinBox::down-button:pressed { |
|
314 border-image: url(images/spindown_pressed.png) 1; |
|
315 } |
|
316 </string> |
|
317 </property> |
|
318 <widget class="QWidget" name="centralwidget"> |
|
319 <layout class="QVBoxLayout"> |
|
320 <property name="spacing"> |
|
321 <number>6</number> |
|
322 </property> |
|
323 <property name="margin"> |
|
324 <number>9</number> |
|
325 </property> |
|
326 <item> |
|
327 <widget class="QFrame" name="mainFrame"> |
|
328 <property name="frameShape"> |
|
329 <enum>QFrame::StyledPanel</enum> |
|
330 </property> |
|
331 <layout class="QGridLayout"> |
|
332 <property name="margin"> |
|
333 <number>9</number> |
|
334 </property> |
|
335 <property name="spacing"> |
|
336 <number>6</number> |
|
337 </property> |
|
338 <item row="6" column="0" colspan="5"> |
|
339 <widget class="QCheckBox" name="agreeCheckBox"> |
|
340 <property name="toolTip"> |
|
341 <string>Please read the LICENSE file before checking</string> |
|
342 </property> |
|
343 <property name="text"> |
|
344 <string>I &accept the terms and &conditions</string> |
|
345 </property> |
|
346 </widget> |
|
347 </item> |
|
348 <item row="5" column="0"> |
|
349 <widget class="QLabel" name="label"> |
|
350 <property name="text"> |
|
351 <string>Profession:</string> |
|
352 </property> |
|
353 <property name="alignment"> |
|
354 <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> |
|
355 </property> |
|
356 <property name="buddy"> |
|
357 <cstring>professionList</cstring> |
|
358 </property> |
|
359 </widget> |
|
360 </item> |
|
361 <item row="0" column="0"> |
|
362 <widget class="QLabel" name="nameLabel"> |
|
363 <property name="text"> |
|
364 <string>&Name:</string> |
|
365 </property> |
|
366 <property name="alignment"> |
|
367 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
|
368 </property> |
|
369 <property name="buddy"> |
|
370 <cstring>nameCombo</cstring> |
|
371 </property> |
|
372 </widget> |
|
373 </item> |
|
374 <item row="1" column="1"> |
|
375 <widget class="QRadioButton" name="maleRadioButton"> |
|
376 <property name="toolTip"> |
|
377 <string>Check this if you are male</string> |
|
378 </property> |
|
379 <property name="text"> |
|
380 <string>&Male</string> |
|
381 </property> |
|
382 </widget> |
|
383 </item> |
|
384 <item row="3" column="0"> |
|
385 <widget class="QLabel" name="passwordLabel"> |
|
386 <property name="text"> |
|
387 <string>&Password:</string> |
|
388 </property> |
|
389 <property name="alignment"> |
|
390 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
|
391 </property> |
|
392 <property name="buddy"> |
|
393 <cstring>passwordEdit</cstring> |
|
394 </property> |
|
395 </widget> |
|
396 </item> |
|
397 <item row="4" column="1" colspan="4"> |
|
398 <widget class="QComboBox" name="countryCombo"> |
|
399 <property name="toolTip"> |
|
400 <string>Specify country of origin</string> |
|
401 </property> |
|
402 <property name="statusTip"> |
|
403 <string>Specify country of origin</string> |
|
404 </property> |
|
405 <property name="currentIndex"> |
|
406 <number>6</number> |
|
407 </property> |
|
408 <item> |
|
409 <property name="text"> |
|
410 <string>Egypt</string> |
|
411 </property> |
|
412 </item> |
|
413 <item> |
|
414 <property name="text"> |
|
415 <string>France</string> |
|
416 </property> |
|
417 </item> |
|
418 <item> |
|
419 <property name="text"> |
|
420 <string>Germany</string> |
|
421 </property> |
|
422 </item> |
|
423 <item> |
|
424 <property name="text"> |
|
425 <string>India</string> |
|
426 </property> |
|
427 </item> |
|
428 <item> |
|
429 <property name="text"> |
|
430 <string>Italy</string> |
|
431 </property> |
|
432 </item> |
|
433 <item> |
|
434 <property name="text"> |
|
435 <string>Norway</string> |
|
436 </property> |
|
437 </item> |
|
438 <item> |
|
439 <property name="text"> |
|
440 <string>Pakistan</string> |
|
441 </property> |
|
442 </item> |
|
443 </widget> |
|
444 </item> |
|
445 <item row="2" column="0"> |
|
446 <widget class="QLabel" name="ageLabel"> |
|
447 <property name="text"> |
|
448 <string>&Age:</string> |
|
449 </property> |
|
450 <property name="alignment"> |
|
451 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
|
452 </property> |
|
453 <property name="buddy"> |
|
454 <cstring>ageSpinBox</cstring> |
|
455 </property> |
|
456 </widget> |
|
457 </item> |
|
458 <item row="4" column="0"> |
|
459 <widget class="QLabel" name="countryLabel"> |
|
460 <property name="text"> |
|
461 <string>Country:</string> |
|
462 </property> |
|
463 <property name="alignment"> |
|
464 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
|
465 </property> |
|
466 <property name="buddy"> |
|
467 <cstring>countryCombo</cstring> |
|
468 </property> |
|
469 </widget> |
|
470 </item> |
|
471 <item row="1" column="0"> |
|
472 <widget class="QLabel" name="genderLabel"> |
|
473 <property name="text"> |
|
474 <string>Gender:</string> |
|
475 </property> |
|
476 <property name="alignment"> |
|
477 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
|
478 </property> |
|
479 </widget> |
|
480 </item> |
|
481 <item row="3" column="1" colspan="4"> |
|
482 <widget class="QLineEdit" name="passwordEdit"> |
|
483 <property name="toolTip"> |
|
484 <string>Specify your password</string> |
|
485 </property> |
|
486 <property name="statusTip"> |
|
487 <string>Specify your password</string> |
|
488 </property> |
|
489 <property name="text"> |
|
490 <string>Password</string> |
|
491 </property> |
|
492 <property name="echoMode"> |
|
493 <enum>QLineEdit::Password</enum> |
|
494 </property> |
|
495 </widget> |
|
496 </item> |
|
497 <item row="1" column="2" colspan="2"> |
|
498 <widget class="QRadioButton" name="femaleRadioButton"> |
|
499 <property name="styleSheet"> |
|
500 <string>Check this if you are female</string> |
|
501 </property> |
|
502 <property name="text"> |
|
503 <string>&Female</string> |
|
504 </property> |
|
505 </widget> |
|
506 </item> |
|
507 <item row="2" column="1" colspan="2"> |
|
508 <widget class="QSpinBox" name="ageSpinBox"> |
|
509 <property name="toolTip"> |
|
510 <string>Specify your age</string> |
|
511 </property> |
|
512 <property name="statusTip"> |
|
513 <string>Specify your age</string> |
|
514 </property> |
|
515 <property name="minimum"> |
|
516 <number>12</number> |
|
517 </property> |
|
518 <property name="value"> |
|
519 <number>22</number> |
|
520 </property> |
|
521 </widget> |
|
522 </item> |
|
523 <item row="0" column="1" colspan="4"> |
|
524 <widget class="QComboBox" name="nameCombo"> |
|
525 <property name="toolTip"> |
|
526 <string>Specify your name</string> |
|
527 </property> |
|
528 <property name="editable"> |
|
529 <bool>true</bool> |
|
530 </property> |
|
531 </widget> |
|
532 </item> |
|
533 <item row="1" column="4"> |
|
534 <spacer> |
|
535 <property name="orientation"> |
|
536 <enum>Qt::Horizontal</enum> |
|
537 </property> |
|
538 <property name="sizeHint" stdset="0"> |
|
539 <size> |
|
540 <width>40</width> |
|
541 <height>20</height> |
|
542 </size> |
|
543 </property> |
|
544 </spacer> |
|
545 </item> |
|
546 <item row="2" column="3" colspan="2"> |
|
547 <spacer> |
|
548 <property name="orientation"> |
|
549 <enum>Qt::Horizontal</enum> |
|
550 </property> |
|
551 <property name="sizeHint" stdset="0"> |
|
552 <size> |
|
553 <width>61</width> |
|
554 <height>20</height> |
|
555 </size> |
|
556 </property> |
|
557 </spacer> |
|
558 </item> |
|
559 <item row="7" column="3" colspan="2"> |
|
560 <widget class="QDialogButtonBox" name="buttonBox"> |
|
561 <property name="orientation"> |
|
562 <enum>Qt::Horizontal</enum> |
|
563 </property> |
|
564 <property name="standardButtons"> |
|
565 <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
|
566 </property> |
|
567 </widget> |
|
568 </item> |
|
569 <item row="5" column="1" colspan="4"> |
|
570 <widget class="QListWidget" name="professionList"> |
|
571 <property name="toolTip"> |
|
572 <string>Select your profession</string> |
|
573 </property> |
|
574 <property name="statusTip"> |
|
575 <string>Specify your name here</string> |
|
576 </property> |
|
577 <property name="whatsThis"> |
|
578 <string>Specify your name here</string> |
|
579 </property> |
|
580 <property name="currentRow"> |
|
581 <number>0</number> |
|
582 </property> |
|
583 <item> |
|
584 <property name="text"> |
|
585 <string>Developer</string> |
|
586 </property> |
|
587 </item> |
|
588 <item> |
|
589 <property name="text"> |
|
590 <string>Student</string> |
|
591 </property> |
|
592 </item> |
|
593 <item> |
|
594 <property name="text"> |
|
595 <string>Fisherman</string> |
|
596 </property> |
|
597 </item> |
|
598 </widget> |
|
599 </item> |
|
600 </layout> |
|
601 </widget> |
|
602 </item> |
|
603 </layout> |
|
604 </widget> |
|
605 <widget class="QMenuBar" name="menubar"> |
|
606 <property name="geometry"> |
|
607 <rect> |
|
608 <x>0</x> |
|
609 <y>0</y> |
|
610 <width>426</width> |
|
611 <height>29</height> |
|
612 </rect> |
|
613 </property> |
|
614 <widget class="QMenu" name="menu_File"> |
|
615 <property name="title"> |
|
616 <string>&File</string> |
|
617 </property> |
|
618 <addaction name="editStyleAction"/> |
|
619 <addaction name="separator"/> |
|
620 <addaction name="exitAction"/> |
|
621 </widget> |
|
622 <widget class="QMenu" name="menu_Help"> |
|
623 <property name="title"> |
|
624 <string>&Help</string> |
|
625 </property> |
|
626 <addaction name="aboutAction"/> |
|
627 <addaction name="aboutQtAction"/> |
|
628 </widget> |
|
629 <addaction name="menu_File"/> |
|
630 <addaction name="menu_Help"/> |
|
631 </widget> |
|
632 <widget class="QStatusBar" name="statusbar"/> |
|
633 <action name="exitAction"> |
|
634 <property name="text"> |
|
635 <string>&Exit</string> |
|
636 </property> |
|
637 </action> |
|
638 <action name="aboutQtAction"> |
|
639 <property name="text"> |
|
640 <string>About Qt</string> |
|
641 </property> |
|
642 </action> |
|
643 <action name="editStyleAction"> |
|
644 <property name="text"> |
|
645 <string>Edit &Style...</string> |
|
646 </property> |
|
647 </action> |
|
648 <action name="aboutAction"> |
|
649 <property name="text"> |
|
650 <string>About</string> |
|
651 </property> |
|
652 </action> |
|
653 </widget> |
|
654 <resources/> |
|
655 <connections/> |
|
656 </ui> |