PDA

View Full Version : A small issue with QComboBox in reverse layout languages using Qt3.3



spikeNIT
2nd April 2008, 07:48
Hello folks,

This is Subramanian. Actually using QComboBox in our application in Hebrew correctly mirrors the Combo but the contents of the combo are still aligned to the left edge of the combo ( since the combo is now mirrored "left edge" is the edge with the arrow control that pops up the list box, is it as Designed? because another app(written using another toolkit) with which our app communicates, displays the combo contents aligned to the right edge in reverse layout languages.

I guess the contents are displayed in the correct way though(just guessing cos i dont understand hebrew :) and figured it out by comparing the individual glyphs in the combo with other glyphs appearing all over the apps, found consistent looking from right to left),

Is there any way to exercise finer control over the display? In the words of Qt doc,

QPainter::drawText( int x, int y, const QString &str ) will always draw the string with it's 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.

if that is the case why then do line edit contents and label text are painted in the expected way and why not the combo?

Please dont mind if the question seems silly, just about beginning to do serious stuff with Qt, infact created my first real dialog last week :) and i did my homework regarding the same...if it is as designed do we need to customize the combo and reimplement paintEvent?if it is not tell me what should i pass to the created combo.

Please point to the relevant thread if it is an already discussed topic and please apologize for the same.