Using qtruby with qtdesigner query

  • Thread starter Nigel Wilkinson
  • Start date
N

Nigel Wilkinson

Hi folks

I've recently started experimenting with qtruby and have decided to
used qtdesigner to do the GUI.

Looking in the example "colortool" the file mainform.rb which is
generated by rbuic calls a method init() which is then redefined
in mainform.ui.rb.

My problem is that my equivalent of mainform.rb does not call init().

What do I have to do in qtdesigner to get it to call init().

Cheers
Nigel
 
R

richard.j.dale

Nigel said:
Hi folks

I've recently started experimenting with qtruby and have decided to
used qtdesigner to do the GUI.

Looking in the example "colortool" the file mainform.rb which is
generated by rbuic calls a method init() which is then redefined
in mainform.ui.rb.

My problem is that my equivalent of mainform.rb does not call init().

What do I have to do in qtdesigner to get it to call init().
You need to use the Edit -> Slots menu in Qt3 Designer to bring up a
dialog called 'Edit Functions' (confusing!). Then add a virtual
function called init() which takes no arguments, returns void and isn't
a slot. When you use rbuic to generate the ruby code, it will add a
call to init() at the end of the initialize method for the form's
class.

-- Richard
 
N

Nigel Wilkinson

You need to use the Edit -> Slots menu in Qt3 Designer to bring up a
dialog called 'Edit Functions' (confusing!). Then add a virtual
function called init() which takes no arguments, returns void and
isn't a slot. When you use rbuic to generate the ruby code, it will
add a call to init() at the end of the initialize method for the
form's class.

-- Richard
Works for me, thankyou.

Nigel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top