-
Notifications
You must be signed in to change notification settings - Fork 665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the language selector to select an RTL language on mac does not cause the ui to be reversed #8806
Comments
Maybe because we call the translations code AFTER we initialized QApplication? |
I think we just need to call |
I cannot reproduce this issue. You didn't reveal which locale you were testing against. I selected a random right-to-left-looking language, and without a code change the layout was changed: I can also control the layout direction using // use a right-to-left layout for such languages
QApplication::setLayoutDirection(QLocale(lang).textDirection()); |
I don't think we should call it directly this should be handled by the translations system. |
Hmm, Qt has this in if (layout_direction == Qt::LayoutDirectionAuto || force_reverse)
QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight); That in turn is called from the That said, I assume you're not running with the (QGuiApplication::tr("QT_LAYOUT_DIRECTION",
"Translate this string to the string 'LTR' in left-to-right"
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL")); Correct? |
of course
the translation is properly rtl displayed on windows and linux. |
This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days. |
The text was updated successfully, but these errors were encountered: