From: David Brunell Date: 2009-01-14T13:37:33+09:00 Subject: Using qui rather than rbuic for qtdesigner .ui files I'm trying to load .ui files at runtime using the qui extension and WidgetFactory rather than pre-translating the .ui XML file to ruby with rbuic. Here's a simple program: require 'Qt' require 'qui' a = Qt::Application.new(ARGV) w = QUI::WidgetFactory.create "sampledialog.ui" w.show() a.connect(a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()')) a.exec() This works just fine in that it dynamically loads and presents the .ui file as a window. However, how do I connect signals and slots? I understand the process of method override when doing it the rbuic way, but this doesn't seem to be working with WidgetFactory. The signals and slots (but not their handling) are defined in the .ui file. Could someone give this noob an example of how to implement a slot method? I tried looking at some C++ examples, but I'm just not making the connection to ruby. The .ui file is below. It just has two buttons, Test and Close. Thanks, David SampleDialogUI SampleDialogUI 0 0 155 45 Sample Dialog true unnamed closeButton Close Close this dialog testButton Test Test command execution testButton clicked() SampleDialogUI testButton_clicked() closeButton clicked() SampleDialogUI closeButton_clicked() testButton_clicked() closeButton_clicked() -- Posted via http://www.ruby-forum.com/.