Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Solved: Maemo 5: Can only draw white text

Solved: Maemo 5: Can only draw white text

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 3.1k Views
  • 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.
  • S Offline
    S Offline
    sleam
    wrote on last edited by
    #1

    @ QBrush brush; brush.setColor(Qt::red);
    QFont font;
    font.setPointSize(60);
    painter->setBrush(brush);
    painter->setFont(font);
    painter->drawText(10,130,tr("test"));@

    This code draws only white text on Maemo and only black text on windows..
    How can I cange the text color ? Is setBrush the wrong approach?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sleam
      wrote on last edited by
      #2

      Sorry for the post, I just found out:
      @QPen pen; pen.setColor(Qt::black);
      painter->setPen(pen);@

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DenisKormalev
        wrote on last edited by
        #3

        You can write less code
        @
        painter->setPen(Qt::black);
        @

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sleam
          wrote on last edited by
          #4

          Oh, thank you, thats better :)

          1 Reply Last reply
          0

          • Login

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