//Let's start.
//First we'll create the main widget. as a dialog
%widget=$new(dialog)
%layout=$new(layout,%widget)
//then the groupbox
%gb=$new(groupbox,%widget)
%gb->$setTitle(Login)
%gb->$setAlignment("Left")
// add the gbox to the main layout
%layout->$addWidget(%gb,0,0)
// now we create the user field (labels + lineedit)
// in a horizontal box
%hbox=$new(hbox,%gb)
%labeluser=$new(label,%hbox)
%labeluser->$settext(User: )
%inputuser=$new(lineedit,%hbox)
//now we create the pass field (labels + lineedit).
// in a horizontal box
%hbox=$new(hbox,%gb)
%labelpass=$new(label,%hbox)
%labelpass->$settext(Pass: )
%inputpass=$new(lineedit,%hbox)
%inputpass->$setechomode("password")
// now we create the ok/cancel box buttons
%hbox=$new(hbox,%gb)
%btnok=$new(button,%hbox)
%btnok->$settext("OK")
%btncancel=$new(button,%hbox)
%btncancel->$settext("Cancel")
//Let's show our nice form
%widget->$show()
|