To paint on a device, usually a widget, we need to overload the function void QWidget::paintEvent(QPainteEvent *event){}

We also need to construct the object of QPainter in the function of paintEvent like this: QPainter painter(this);

Then we will be able to use QPainter whataver we like.

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-06
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2022-01-06
猜你喜欢
  • 2021-09-25
  • 2022-02-23
  • 2022-01-11
  • 2021-06-08
  • 2022-12-23
  • 2021-04-02
  • 2022-12-23
相关资源
相似解决方案