Yes, because QColor is a "primitive":
The primitive Qt types (this was a design decision) are all listed in
the EQL GUI, so if you run (qgui), you find them under "Qt /
Primitives".
So, you can't use "qnew" for the primitives. In the case of QColor,
you must use a string representation, e.g. "#FF0000" or "red". You
find all recognized color names here:
http://www.w3.org/TR/SVG/types.html#ColorKeywords
But you can also use all static QColor functions, so in your case, one
of "fromRgb", "fromHsv", "fromCmyk":
(qfun "QColor" "fromRgb(int,int,int)" 255 0 0)
Paul
(qfun "QString" "number(int)" 1)
Good question. But there are already nice Lisp functions like:
(write-to-string 16 :base 16) ; gives "10"
Paul
#<QGraphicsView 0x4715698>
(setq trans (qnew "QTransform(qreal,qreal,qreal,qreal,qreal,qreal)" 1 0 0 1 0 10))
#<QTransform 0x12bfd50>
(qfun view "setTransform" trans) ; Error: Detected access to an invalid or protected memory address.
Thanks, you found a bug! (I like catching bugs.)
I already fixed it. Please get the new version from gitorious. The
only file that changed is "src/ecl_fun.cpp" (regarding this bug).
Paul