Dawid Sip wrote:
> Hi,
>
> Im trying to connect the 'changed' signal of my QGraphicsScene 'scene'
> object to a slot. Other signals of the scene object are easy to connect,
> but changed is a little different due to its generic List object -
> java.util.List<QRectF <cid:[email protected]>>
>
> I connect my slot like this:
> scene.changed.connect(this, "documentWasModified(List<QRectF>)" );
> ...
> public void documentWasModified(List<QRectF> li){
>
> System.out.println("AAAAAargh");
> this.setWindowModified(true);
> }
>
> But the compiler wont recognize the line which connects to the slot:
>
> Could not find slot with signature: documentWasModified(List<QRectF>)
> Possible matching methods:
> documentWasModified(com.trolltech.qt.core.QRectF)
>
> at
> com.trolltech.qt.QSignalEmitter$AbstractSignal.connect(QSignalEmitter.java:128)
Hi Dave,
In 4.4 you get this warning:
Possible matching methods:
slot(java.util.List)
Which is the right way of specifying the signal. There is however a
problem with generics based signals. It seems we currently don't emit
the java signal when the C++ signal is emitted, so you will in effect
never receive any emits from the scene. I'll schedule this to be fixed
for the next release.
best regards,
Gunnar
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest