Skip to content

Instantly share code, notes, and snippets.

@un1versal
Last active February 9, 2017 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save un1versal/bf4ae903246f6b1494092866d4454860 to your computer and use it in GitHub Desktop.
Save un1versal/bf4ae903246f6b1494092866d4454860 to your computer and use it in GitHub Desktop.
%widget = $new(dockwindow)
# This is the main container for other elements.
%widget->$setWindowTitle("This is the widget title")
%box=$new(vbox,%widget)
%layout=$new(layout,%widget)
%layout->$addWidget(%box,0,0)
%label = $new(label,%box)
%label->$setText("This is a text label")
%widget->$setAllowedDockAreas("l","f")
%checkbox = $new(checkbox,%box)
%checkbox->$setText("This is a checkbox")
%combobox = $new(combobox,%box)
%combobox->$insertItem("This is a combobox")
%combobox->$insertItem("This is a combobox's item")
%listbox = $new(listbox,%box)
%listbox->$insertItem("This is a listbox item")
%listbox->$insertItem("This is another item")
%button = $new(button, %box)
%button->$setText("Close me")
privateimpl(%widget,closeMe)
{
delete $$
}
objects.connect %button clicked %widget closeMe
%widget->$show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment