Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cairo and Qt integration

I want to use Cairo graphics library whith Qt, but I can't find any documenattion. I just want to make the GUI whith Qt and use Cairo for drawing graphics in a Qt window.

Thanks.

like image 440
Andrei Avatar asked Oct 28 '09 20:10

Andrei


People also ask

Does Qt use Cairo?

Qt has its own graphics primitives implemented and so does Cairo.

Does Inkscape use Cairo?

The vector graphics application Inkscape uses the Cairo library for its outline mode display, as well as for PDF and PostScript export since release 0.46.


1 Answers

Starting from cairo 1.17.8, the Qt support will be removed upstream.

Old answer

Recent version of cairo supports Qt by allowing to draw to a surface created with cairo_qt_surface_create(QPainter *painter): you can inspect the relevant header file here. There's no documentation because this feature is still experimental and disabled by default (you should compile cairo yourself explicitely enabling the Qt support with configure --enable-qt.

like image 129
ntd Avatar answered Oct 07 '22 23:10

ntd