Last active
February 9, 2017 18:06
-
-
Save un1versal/2f1c1c2f2220c6b2401259f61041f2a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First we'll create the main tabWidget. | |
%qcheatsheet=$new(tabWidget) | |
%qcheatsheet->$setToolTip("Show me a nice tooltip") | |
%qcheatsheet->$setTabPosition(Top) | |
%qcheatsheet->$setGeometry(400,400,600,400) | |
%qcheatsheet->$setWindowTitle("Testme") | |
# Now we'll create the new widgets and put they in to the main tabWidget. | |
%firsttab=$new(vbox) | |
%secondtab=$new(vbox) | |
# First tab | |
%html1 = $file.localdir("/tab-a.html") | |
%textbrowser = $new(textbrowser, %firsttab) | |
%textbrowser->$setSource(%html1) | |
%qcheatsheet->$addTab(%firsttab,Accel Keys, 65) | |
# We do the same work with the second tab's page. | |
%html2 = $file.localdir("/tab-b.html") | |
%textbrowser = $new(textbrowser, %secondtab) | |
%textbrowser->$setSource(%html2) | |
%qcheatsheet->$addTab(%secondtab,Manual Commands, 9) | |
# Show the widget. | |
%qcheatsheet->$show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment