I tried to do a simple thing:

Qt Code:
  1. painter->drawText(rect, Qt::AlignTop && Qt::AlignRight, str);
  2. painter->drawLine(rect.topLeft(), rect.bottomRight());
  3. painter->drawText(rect, Qt::AlignBottom, "ASD");
To copy to clipboard, switch view to plain text mode 

But it didn't work...
The top line get's aligned only top, but not top + right.
How can i get it to align top + right?
I think it has something to do with flags, but i could not confirm that idea.