Qt 4.7 Desktop application support for right-to-left UI (Hebrew)



  • I was unable to find a conclusive information in the Qt documentation on the if and how the Qt framework support for right-to-left text input as in Hebrew.
    Could someone confirm that this is supported or point to the proper documentation where to find this information?
    Thank you in advance!



  • @
    QLineEdit* qled = new QLineEdit();
    qled->setLayoutDirection(Qt::RightToLeft);
    @

    [EDIT: code formatting, Volker]



    1. generally
      does this mean that right-to-left languages are generally supported by Qt?

    2. to the code snipped:
      according to the documentation of 4.7 setLayoutDirection in the widget is no longer supported but should rather be used on the application.



    1. Qt has a valuable set of things that help people to develop RTL languages like Hebrew and Persian.

    You may want to load Hebrew translation of Qt itself. if you do so, you don't need to manually configure layout direction for each form in your application. When your program loads the translation, all directions will be automatically set to RTL.

    I was surprised when saw that new thing in Qt. I think developers should be able to manually set direction of each widget. but if you just want to set directions for your application try
    @QApplication::setLayoutDirection(Qt::LayoutDirection)@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.