root/trunk/orca/qt/demos/widgets.r

Revision 92, 1.6 kB (checked in by krobillard, 3 years ago)

Qt - Improved widgets demo.

Line 
1orca []
2
3exec widget [
4    vbox [
5        tab [
6            "Basic" [
7                vbox [
8                    hbox [button "Button" [] spacer]
9                    hbox [
10                        label "Combo"
11                        combo ["Item one" "Item two" "Last Item"]
12                        spacer
13                    ]
14                    checkbox "Checkbox"
15                    spacer
16                ]
17            ]
18            "Text" [
19                vbox [
20                    hbox [label "Line-edit" line-edit]
21                    text-edit
22{<h2>Text-Edit Widget</h2>
23<p>Text-edit can show basic <i>HTML</i>.</p>
24<hr>
25<h3>A List</h3>
26<ul>
27<li>Item one</li>
28<li>Item two</li>
29</ul>
30}
31                ]
32            ]
33            "Dialogs" [
34                vbox [
35                    button "Message" [
36                        message "Message"
37                                "This was invoked by the 'message word."
38                    ]
39
40                    button "Question" [
41                        answer: question "Question"
42                                         "Do you like vanilla yogurt?"
43                                         "Yes" "Umm, not so much"
44                        message "Answer" join "Question returned: " answer
45                    ]
46
47                    button "Request-file" [
48                        file: request-file "Select a file"
49                        message "File Selected" to-string file
50                    ]
51
52                    spacer
53                ]
54            ]
55        ]
56
57        spacer
58        hbox [spacer button "Quit" [quit]]
59    ]
60]
Note: See TracBrowser for help on using the browser.