occt-samples-qopenglwidget icon indicating copy to clipboard operation
occt-samples-qopenglwidget copied to clipboard

Cannot mixed using QPainter

Open bigwatercar opened this issue 1 year ago • 0 comments

When I add QPainter code to draw some text for testing, I got an unexpected result, as following image.

image

the testing code I added is:

  {
    QPainter p(this);
    p.setPen(Qt::yellow);
    QFont font;
    font.setFamily("Arial");
    font.setPixelSize(32);
    p.setFont(font);
    p.drawText(QPoint(400, 50), QLatin1String("ABCDEFG"));
  }

image

Why the text drawing by QPainter looks bad?

sorry for my bad english. Thanks for your project.

bigwatercar avatar Nov 30 '23 14:11 bigwatercar