[Kdenlive-devel] Problems with signals and slots

Simon Eugster simon.eu at gmail.com
Wed Nov 24 10:10:57 UTC 2010


Well, the «old» signal (using volume) _does_ work, but I cannot explain why.
When I try to do the same with my new signal, it does not work.

Simon

2010/11/24 Marco Gittler <marco at gitma.de>:
> Hi
>
> I'll change this, to get it working (first on the "old" audiosignal)
> You can use this then for your audiospectrum.
>
>
> regards marco
>
> Am 24.11.2010 um 09:42 schrieb Simon Eugster:
>
>> Good Morning,
>>
>> I'm battling around with Qt's signals and slots. In r5116,
>> mainwindow.cpp:296 I want to connect my audiospectrum object to
>> Render::audioSamplesSignal. But whatever I do, my method never
>> receives the signal, although connecting works according to the return
>> value, Q_ASSERT etc.
>>
>> On line 298 I tried to find a reason for it and used the audio volume
>> signal. It is defined as:
>>  void showAudioSignal(const QByteArray);
>> According to the Qt documentation and some people in #qt, Qt uses
>> normalizedSignature[1] for signal/slot connections. Meaning that I
>> should be able to just use
>>  SIGNAL(showAudioSignal(QByteArray))
>> to connect the signal. But then connecting fails, telling me that
>> there is no such signal.
>>
>> I do not get an error though when using
>>  SIGNAL(showAudioSignal(const QByteArray)
>> i.e. the connection is set up correctly. Nevertheless the connected
>> slot is never called. Only if I use
>>  SIGNAL(showAudioSignal(const QByteArray&)
>> connecting works AND the slot gets called. Although the & is not in
>> showAudioSignal's signature.
>>
>> So I tried to use the & for my signal (audioSamplesSignal) as well:
>>  audioSamplesSignal(const QVector<int16_t>&,int,int,int)
>> with
>>  void audioSamplesSignal(const QVector<int16_t>,int,int,int)
>> but this fails with «no such signal». Why should I have to add a & for
>> a QByteArray, but I'm forbidden to do so for the QVector?
>>
>> I then tried to change everything (including the signal's signature)
>> to const type& (whether making sense or not – what I noticed above
>> does not make sense to me anyway). But still, no signal received.
>>
>> Can anyone help me? Why is qt behaving that way? What is the problem?
>>
>> thanks
>> Simon
>>
>> [1] http://doc.qt.nokia.com/4.7/qmetaobject.html#normalizedSignature
>>
>> ------------------------------------------------------------------------------
>> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
>> Tap into the largest installed PC base & get more eyes on your game by
>> optimizing for Intel(R) Graphics Technology. Get started today with the
>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>> http://p.sf.net/sfu/intelisp-dev2dev
>> _______________________________________________
>> Kdenlive-devel mailing list
>> Kdenlive-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/kdenlive-devel
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Kdenlive-devel mailing list
> Kdenlive-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kdenlive-devel
>
>




More information about the Kdenlive mailing list