views:

1106

answers:

3

Hi.

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.

+2  A: 
dirkgently
Thank's for the answer.I just want a simple graphics library and a GUI library that can work togheter very easly, and I don't want to use the GUI library functions for drawing, I like Cairo because it's simple to use and It's vector based. Maybe you can recomend me another GUI library.
andreeib
This is the part I don't understand, why don't you want to use Qt? Maybe, we can suggest an alternative then. Qt is more than GUI. Graphics libraries are at a lower level of abstraction than GUI libraries. IMHO, You are taking a step back. GTK+ is another such GUI library (with a Cairo backend).
dirkgently
I will try Qt graphic functions. I tried GTK but it's a pain to use in projects.
andreeib
+3  A: 

The Qt paint system is a very good drawing library and is vector based. And it's already there. If you pick Qt as your GUI toolkit, it can't get any easier.

andref
+2  A: 

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.

ntd
I will surely try this, I really hope it work's because now I am trying GTK and It's not so good as Qt.
andreeib
If you are using C++ I think you'll be more comfortable by using the [C++ bindings](http://library.gnome.org/devel/gtkmm-tutorial/unstable/index-info.html.en), not plain GTK+ itsself. Qt and QPainter, GTK+ and cairo, gtkmm and cairomm and any valid mix... depending on what you want they are all valid options.
ntd