Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Different font rendering between paint devices (QPicture, QPrinter)
Forum Updated to NodeBB v4.3 + New Features

Different font rendering between paint devices (QPicture, QPrinter)

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wesulaner
    wrote on 2 Mar 2012, 01:19 last edited by
    #1

    How can I prompt QPainter to draw text on QPicture in the same way it do on a QPrinter device?

    Output in PDF when I draw first in a QPicture an play() then to a painter with QPrinter Device:

    !http://www.wesolutions.at/boards/picture.jpg!

    @
    m_painter->begin(m_picture);
    m_painter->setBrush(Qt::black);
    m_painter->setPen(Qt::black);
    m_painter->setFont(QFont("Arial", 9));
    m_painter->drawText(0,0, "In Alaska reichen die ältesten gesicherten menschlichen");
    m_painter->end();

    m_painter->begin(m_printer);
    m_picture->play(m_painter);
    m_painter->end();
    @

    And this is the Output when I draw directily to a QPainter with a QPrinter:

    !http://www.wesolutions.at/boards/printer.jpg!

    @
    m_painter->begin(m_printer);
    m_painter->setBrush(Qt::black);
    m_painter->setPen(Qt::black);
    m_painter->setFont(QFont("Arial", 9));
    m_painter->drawText(0,0, "In Alaska reichen die ältesten gesicherten menschlichen");
    m_painter->end();
    @

    I’ll need paint first on Picture for a couple reasons.

    Thank you in advance!
    wesu

    1 Reply Last reply
    0

    1/1

    2 Mar 2012, 01:19

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved