[Kde-bindings] Fw: Qyoto issues - QPainter, QSvgGenerator
Dimitar Dobrev
dpldobrev at yahoo.com
Fri Feb 1 13:05:47 UTC 2013
----- Forwarded Message -----
From: Dimitar Dobrev <dpldobrev at yahoo.com>
To: Ruth Ivimey-Cook <ruth at ivimey.org>
Sent: Friday, February 1, 2013 3:05 PM
Subject: Re: [Kde-bindings] Qyoto issues - QPainter, QSvgGenerator
Ruth,
1. SVG - yes, these properties are really missing, this is a pure bug; I'll take a look tonight;
2. setOverrideCursor - this method is gone in Qyoto because I merge all get/set methods into C# properties; that is, you've correctly found out that QApplication.OverrideCursor is the substitute to use. About QApplication.OverrideCursor = Qt.CursorShape.WaitCursor; , apparently PyQt has a convenient implicit conversion operator because otherwise this isn't supposed to work. If you look at the Qt docs for QApplication::setOverrideCursor you'll see:
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
That is, you need to pass a QCursor, not just an enum value. In Qyoto this would look like:
QApplication.OverrideCursor = new QCursor(Qt.CursorShape.WaitCursor);
3. QGraphicsItem.Scale has two overloads; the one with 0 parameters is not obsolete but the one with 2 is (Qt 4.8.4). The comment there hasn't been generated well because I use regular expressions to extract the documentation and apparently there are come cases I do not handle well yet. Anyway, the substitute is setTransform(QTransform::fromScale(sx, sy), true).
Regards,
Dimitar Dobrev
________________________________
From: Ruth Ivimey-Cook <ruth at ivimey.org>
To: Dimitar Dobrev <dpldobrev at yahoo.com>; KDE bindings for other programming languages <kde-bindings at kde.org>
Sent: Friday, February 1, 2013 2:07 PM
Subject: Re: [Kde-bindings] Qyoto issues - QPainter, QSvgGenerator
Dimitar
> Sorry about that "End" property. I've already fixed it but I haven't uploaded binaries yet. I'll do this tonight. In the mean-time as a workaround you could just assign an unused variable to the End property, the effect would be the same.
> About the SVG generator, this one I haven't encountered. I'll attempt to include the fix in the tonight binaries.
>
Many thanks for your quick response Dimitar.
To be more explicit, the SVG properties I am using are Filename,
Size, Title and Description. The missing Filename property, in
particular, makes the class useless as it is used to set the output
file.
I am also having trouble getting this line, which used to work in
PyQt, to compile:
QtGui.QApplication.[sS]etOverrideCursor(QtCore.Qt.CursorShape.WaitCursor);
although the corresponding:
QtGui.QApplication.[rR]estoreOverrideCursor();
seems to be compiling ok. Is this my misunderstanding? I did try to
see if this version of setOverrideCursor would work, but it doesn't
because of a type mismatch:
QApplication.OverrideCursor = Qt.CursorShape.WaitCursor;
For the moment, I've commented out both calls in my code but it
would be good to reinstate them.
Finally, I notice a warning:
Warning 13 'QtGui.QGraphicsItem.Scale(double,
double)' is obsolete: '"instead."'
which I didn't get in PyQt and isn't marked as obsolete in the qt
4.8 docs - indeed it was only introduced in qt 4.6.
Regards
Ruth
--
Software Manager & Engineer
Tel: 01223 414180
Blog: http://www.ivimey.org/blog
LinkedIn: http://uk.linkedin.com/in/ruthivimeycook/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20130201/7e4e6a6e/attachment.html>
More information about the Kde-bindings
mailing list