I have a C function from an C program that I call from a widget.

This works! I use extern C to include the .h and call my function.

The problem is this function contain some calls to draw lines. I would like to draw lines with QPainter.

So I call my C function from my widget and how is possible to call drawLine from QPainter from my C function.