Hi,
i want to change layout direction of whole Qt application from left to right and from right to left depends upon language selected by user. if user choose English then layout will be left to right and if he/she chooses urdu/arabic then layout will be right to left. i have done some coding but i am facing problem of Qapplication::setlayoutdirection api. it is not working or something else. i am running qt application on ubuntu 12.04 desktop environment.
below is my sample code of main function:
QApplication a(argc, argv);
if(LAYOUT_RTL == g_layout_type)
{
a.setLayoutDirection(Qt::RightToLeft);
qDebug() << "Right to left mode:" << a.layoutDirection() << a.isRightToLeft();
}
else if(LAYOUT_LTR == g_layout_type)
{
a.setLayoutDirection(Qt::LeftToRight);
qDebug() << "Left to right mode:" << a.layoutDirection() << a.isRightToLeft();
}
a.exec();
thanks in advance
Bookmarks