In Qt I use a QMenuBar
and add some menus to it. My program is multi language and when I use a left to right language like English, every thing is OK, and when I choose a language which has right to left direction, I have to add this line to my main.cpp:
MainWindow w;
w.setLayoutDirection(Qt::RightToLeft);
So every widgets move to right except QMenubar
.
I also add this line to my QMenuBar
:
ui->menubar->setLayoutDirection(Qt::RightToLeft);
and
QApplication::setLayoutDirection(Qt::RightToLeft);
But nothing happens.
Should I set/change another option?