From: David Brunell Date: 2009-01-20T06:06:17+09:00 Subject: Re: Using qui rather than rbuic for qtdesigner .ui files Ok, I got it working. Here is my code: ########################################## require 'Qt' require 'qui' class MainWidget < Qt::Widget slots 'test()', 'close()' def initialize(app) super() @app = app @widget = QUI::WidgetFactory.create "sampledialog.ui" connect @widget.child('testButton'), SIGNAL('clicked()'), self, SLOT('test()') connect @widget.child('closeButton'), SIGNAL('clicked()'), self, SLOT('close()') @widget.show end def test puts "test button clicked" end def close @app.exit(0) end end app = Qt::Application.new ARGV dialog = MainWidget.new(app) app.exec ###################################### The .ui file is the same as in the original post. I'm not sure this is the most elegant way to make it work, so if you have any ideas on how to clean it up, I'm open to suggestions. One other question...what about Qt4? I think I need rbuic4 if I am going to pre-compile the ui. Is there a qui4 for dynamic loading? Kind regards, David -- Posted via http://www.ruby-forum.com/.