Cairo and Qt integration

后端 未结 4 516
春和景丽
春和景丽 2021-02-01 07:58

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.

4条回答
  •  执念已碎
    2021-02-01 08:34

    It can be achieved by this dirty way:

    1. Create an cairo image surface, draw on that surface.
    2. Call cairo_image_surface_get_data() to get the pixels.
    3. Copy the image to a Qt widget.

提交回复
热议问题