Csound Csound-dev Csound-tekno Search About

[Csnd] PythonQt error with connect slots

Date2017-11-10 14:00
FromRichard
Subject[Csnd] PythonQt error with connect slots

I'm trying the example EXAMPLE 12C05_string_sound.csd Every connect function returns an error.

E.g this line:

playButton.connect(SIGNAL("clicked()"),play)

gives:

ValueError: Could not find matching overload for given arguments:(QByteArray (2clicked(), at: 0x7fa606359260), <function play at 0x11630ab18>) The following slots are available:connect(QString signal, PyObject callable) ->etc..

Richard


Date2017-11-10 15:19
FromTarmo Johannes
SubjectRe: [Csnd] PythonQt error with connect slots
Hi,

I am glad you are checking out PythonQt possibilities - it opens vast 
possibilities.

And thanks for the feedback!

The tutorial was written in time of Qt 4, seems that things have changed it 
Qt5 and some things don't work.

Please try following syntax for the connections:

..()

ie

playButton.clicked.connect(play)

see http://zetcode.com/gui/pyqt5/eventssignals/

I must double check the examples thus.

I am leaving for copule of days, then will have a look at the scope problem 
you mentioned in previous email.

Best!
tarmo



On reede, 10. november 2017 16:00.33 EET you wrote:
> I'm trying the example /*EXAMPLE 12C05_string_sound.csd*/ Every connect
> function returns an error.
> 
> E.g this line:
> 
> playButton.connect(SIGNAL("clicked()"),play)
> 
> gives:playButton.clicked.connect(play)
> 
> ValueError: Could not find matching overload for given
> arguments:(QByteArray (2clicked(), at: 0x7fa606359260),  at 0x11630ab18>) The following slots are available:connect(QString
> signal, PyObject callable) ->etc..
> 
> Richard
> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-11-10 15:39
FromRichard
SubjectRe: [Csnd] PythonQt error with connect slots
Thanks, that works.

I noted that the normal (empty) widget also comes up. Is there a way to 
suppress this?

Richard


On 10/11/17 16:19, Tarmo Johannes wrote:
> Hi,
>
> I am glad you are checking out PythonQt possibilities - it opens vast
> possibilities.
>
> And thanks for the feedback!
>
> The tutorial was written in time of Qt 4, seems that things have changed it
> Qt5 and some things don't work.
>
> Please try following syntax for the connections:
>
> ..()
>
> ie
>
> playButton.clicked.connect(play)
>
> see http://zetcode.com/gui/pyqt5/eventssignals/
>
> I must double check the examples thus.
>
> I am leaving for copule of days, then will have a look at the scope problem
> you mentioned in previous email.
>
> Best!
> tarmo
>
>
>
> On reede, 10. november 2017 16:00.33 EET you wrote:
>> I'm trying the example /*EXAMPLE 12C05_string_sound.csd*/ Every connect
>> function returns an error.
>>
>> E.g this line:
>>
>> playButton.connect(SIGNAL("clicked()"),play)
>>
>> gives:playButton.clicked.connect(play)
>>
>> ValueError: Could not find matching overload for given
>> arguments:(QByteArray (2clicked(), at: 0x7fa606359260), > at 0x11630ab18>) The following slots are available:connect(QString
>> signal, PyObject callable) ->etc..
>>
>> Richard
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>          https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-11-10 15:59
FromTarmo Johannes
SubjectRe: [Csnd] PythonQt error with connect slots
Hi,

I am off to airport to play in Stockholm

- Csounders in Stockholm, come and listen! -

back to this on Monday.

Greetings,
Tarmo

10.11.2017 17:40 kirjutas kuupäeval "Richard" <zappfinger@gmail.com>:
Thanks, that works.

I noted that the normal (empty) widget also comes up. Is there a way to suppress this?

Richard


On 10/11/17 16:19, Tarmo Johannes wrote:
Hi,

I am glad you are checking out PythonQt possibilities - it opens vast
possibilities.

And thanks for the feedback!

The tutorial was written in time of Qt 4, seems that things have changed it
Qt5 and some things don't work.

Please try following syntax for the connections:

<object>.<signal>.(<function>)

ie

playButton.clicked.connect(play)

see http://zetcode.com/gui/pyqt5/eventssignals/

I must double check the examples thus.

I am leaving for copule of days, then will have a look at the scope problem
you mentioned in previous email.

Best!
tarmo



On reede, 10. november 2017 16:00.33 EET you wrote:
I'm trying the example /*EXAMPLE 12C05_string_sound.csd*/ Every connect
function returns an error.

E.g this line:

playButton.connect(SIGNAL("clicked()"),play)

gives:playButton.clicked.connect(play)

ValueError: Could not find matching overload for given
arguments:(QByteArray (2clicked(), at: 0x7fa606359260), <function play
at 0x11630ab18>) The following slots are available:connect(QString
signal, PyObject callable) ->etc..

Richard


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
         https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
         https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-11-10 20:16
FromRichard
SubjectRe: [Csnd] PythonQt error with connect slots

good luck and skål!

Richard


On 10/11/17 16:59, Tarmo Johannes wrote:
Hi,

I am off to airport to play in Stockholm

- Csounders in Stockholm, come and listen! -

back to this on Monday.

Greetings,
Tarmo

10.11.2017 17:40 kirjutas kuupäeval "Richard" <zappfinger@gmail.com>:
Thanks, that works.

I noted that the normal (empty) widget also comes up. Is there a way to suppress this?

Richard


On 10/11/17 16:19, Tarmo Johannes wrote:
Hi,

I am glad you are checking out PythonQt possibilities - it opens vast
possibilities.

And thanks for the feedback!

The tutorial was written in time of Qt 4, seems that things have changed it
Qt5 and some things don't work.

Please try following syntax for the connections:

<object>.<signal>.(<function>)

ie

playButton.clicked.connect(play)

see http://zetcode.com/gui/pyqt5/eventssignals/

I must double check the examples thus.

I am leaving for copule of days, then will have a look at the scope problem
you mentioned in previous email.

Best!
tarmo



On reede, 10. november 2017 16:00.33 EET you wrote:
I'm trying the example /*EXAMPLE 12C05_string_sound.csd*/ Every connect
function returns an error.

E.g this line:

playButton.connect(SIGNAL("clicked()"),play)

gives:playButton.clicked.connect(play)

ValueError: Could not find matching overload for given
arguments:(QByteArray (2clicked(), at: 0x7fa606359260), <function play
at 0x11630ab18>) The following slots are available:connect(QString
signal, PyObject callable) ->etc..

Richard


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
         https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
         https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here