November 7, 2010

sleam sleam
Lab Rat
30 posts

Solved: Maemo 5: Can only draw white text

 

  1.     QBrush brush; brush.setColor(Qt::red);
  2.     QFont font;
  3.     font.setPointSize(60);
  4.     painter->setBrush(brush);
  5.     painter->setFont(font);
  6.     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?

3 replies

November 7, 2010

sleam sleam
Lab Rat
30 posts

Sorry for the post, I just found out:

  1. QPen pen; pen.setColor(Qt::black);
  2.     painter->setPen(pen);

November 7, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1607 posts

You can write less code

  1. painter->setPen(Qt::black);

November 7, 2010

sleam sleam
Lab Rat
30 posts

Oh, thank you, thats better :)

 
  ‹‹ Develop for Symbian under Linux      how to Get the Children of Tool Bar ? ››

You must log in to post a reply. Not a member yet? Register here!