Changing layout
-
QApplication::setLayoutDirection() doesn't affect already instantiated widgets.
You need to call setLayoutDirection in your main() function like this
@int main(int argc, char** argv)
{
QApplication app(argc, argv);
app.setLayoutDirection(Qt::RightToLeft);
// show stuff
return app.exec();
}@However, if you want to change the layout direction after your QApplication has been execed you need to install a new QTranslator and retranslteUi() your UI.
See "this email thread":http://lists.qt.nokia.com/pipermail/qt-interest/2011-May/033798.html for more information and example code.