Am Dienstag, 2. Januar 2007 12:03 schrieb Abdelrazak Younes:
> Abdelrazak Younes wrote:
> > In QLPainter::text(), we pass the string to draw to Qt on a word by
word
> > basis and the Layout direction is explicitly set to LTR:
> >
> > // We need to draw the text as LTR as we use our own bidi code.
> > setLayoutDirection(Qt::LeftToRight);
> > if (isDrawingEnabled()) {
> > drawText(x, y, str);
> > }
> >
> > Could it be that your Qt settings somewhat override the layout
direction?
I don't know. There is a "Enhanced support for languages written in
right-to-left" checkbox in qtconfig, but is has no effect.
> Qt (4.1) documentation say that we should not use this drawText() method
> but rather the one that uses QRect instead:
>
> QPainter::drawText(int x, int y, const QString &str) will always draw
> the string with its left edge at the position specified with the x, y
> parameters. This will usually give you left aligned strings. Arabic and
> Hebrew application strings are usually right aligned, so for these
> languages use the version of drawText() that takes a QRect since this
> will align in accordance with the language.
But that does not explain why I get something different than you. My qt
version is 4.2.1, what do you use? Do you also have that checkbox in
qtconfig? Does it change anything?
Georg