Skip to content

Instantly share code, notes, and snippets.

@ynonp
Created August 2, 2012 15:49
Show Gist options
  • Save ynonp/3238073 to your computer and use it in GitHub Desktop.
Save ynonp/3238073 to your computer and use it in GitHub Desktop.
qt demo1
require 'Qt'
require './demo1_ui.rb'
a = Qt::Application.new(ARGV)
u = Ui_Form.new
w = Qt::Widget.new
u.setupUi(w)
w.show
u.btn1.connect( SIGNAL :clicked ) {
u.list1.add_item( "Qt FTW" )
}
a.exec
require 'Qt'
require './demo1_ui.rb'
a = Qt::Application.new(ARGV)
u = Ui_Form.new
w = Qt::Widget.new
u.setupUi(w)
w.show
u.btn1.connect( SIGNAL :clicked ) {
filename = Qt::FileDialog.get_open_file_name;
u.list1.add_item( filename )
}
a.exec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment