[Kde-bindings] Combobox signal question
Han Holl
han.holl at pobox.com
Sun Oct 3 13:33:59 UTC 2004
Hello,
If I run the following:
require 'Qt'
class Chooser < Qt::Object
slots 'setStyle(const Qstring&)'
def setStyle(what)
puts what
end
end
a = Qt::Application.new(ARGV)
w = Qt::ComboBox.new('combo') do
insertStringList %w{ abc def geh }
setCurrentText 'def'
end
c = Chooser.new
Qt::Object.connect(w, SIGNAL('activated(const Qstring&)'), c,
SLOT('setStyle(const Qstring&)'))
a.mainWidget = w
w.show
a.exec
I get:
QObject::connect: No such signal Qt::ComboBox::activated(const Qstring&)
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'unnamed')
If I switch to activated(int) -- less convenient in my case -- it does work.
Why is this? Is there a problem with overloaded signals. Should I gine a
different signature?
Cheers,
Han Holl
More information about the Kde-bindings
mailing list