[Kde-bindings] Combobox signal question

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Oct 3 13:44:38 UTC 2004


On Sunday 03 October 2004 14:33, Han Holl wrote:
> 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?
It should be 'const QString&' with a capital 'S'..

-- Richard



More information about the Kde-bindings mailing list