Important: Please read the Qt Code of Conduct -

Solved: intermediate: Mirroring application for right to left languages (e.g Arabic/Hebrew)

  • Hello guys,

    I am trying to learn how to mirror an application for internationalization with RTL languages, e.g Arabic but don't know how. Could any person guide me with an example?


    @ int main(int argc, char *argv[])
    QApplication a(argc, argv);
    int value=1; // Arabic
    // 1 Translation start
    if (value==1) { qApp->setLayoutDirection(Qt::RightToLeft);}
    if (value==0) { qApp->setLayoutDirection(Qt::LeftToRight);}
    // 1 Translation End

Log in to reply