How do I paint with QPainter?

后端 未结 3 647
我在风中等你
我在风中等你 2021-01-05 04:23

I have started learning Qt recently.
I did not get quite clear how can I paint using QPainter class. Let`s say I want just to place a few points in the win

3条回答
  •  孤城傲影
    2021-01-05 04:59

    You need to initialize the painter with the widget you want to paint on.
    Usually this is done using the constructor which takes a QPaintDevice but you can also do it by calling begin().

提交回复
热议问题