[Kde-bindings] Qyoto and QImage constructor (missing method)
Lorenz Cuno Klopfenstein
lck at klopfenstein.net
Sat Jul 10 21:39:02 UTC 2010
Hello everybody,
I've been working with Qyoto for a bit now, using the package that
ships with Ubuntu 10.04. I've hit a problem when trying to construct a
QImage instance using a raw data pointer (that I get from GStreamer).
The code that generates the image is as follows:
byte[] incomingBuffer; //copied in from Gst
var p = new Pointer<byte>(incomingBuffer);
var img = new QImage(p, 320, 240, QImage.Format.Format_RGB32);
I'm pretty sure the raw data and the parameters are correct. However,
the application outputs the following, before crashing:
LEAVE Invoke() ** Missing method ** QImage.QImage(uchar*, int,
int, QImage::Format)
Cannot handle 'const QImage&' as argument to QPainter::drawImage
So, I'm assuming the constructor is not called and then, when
attempting to draw the partially constructed image, the app fails in
Qt's native code.
I found the following bug fix concerning uchar* marshalling in QtRuby
which seems similar:
http://permalink.gmane.org/gmane.comp.kde.devel.bindings/3968
Is there a way to fix the problem (or is it fixed and do I need to
compile Qyoto from source?).
Thank you very much!
PS: another weird thing is that the QWidget.WinId() method is missing
in my Qyoto Dll. I have been able to work around the issue by using
the following extension method:
public static uint WinId(this QWidget widget){
var invocation = new SmokeInvocation(typeof(QWidget), widget);
return (uint)invocation.Invoke("winId", "winId() const", typeof(uint));
}
But still, is it a problem with the Ubuntu package or am I missing something?
--
Lorenz Cuno Klopfenstein
lck at klopfenstein.net
http://lorenz.klopfenstein.net
More information about the Kde-bindings
mailing list