From 0721a58c018a1aec184760330d8323d309fce243 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Sat, 6 Jul 2024 10:51:40 +0800 Subject: [PATCH] opt: layout according to the language --- src/main.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cc b/src/main.cc index 5b64efe0..b40656cf 100644 --- a/src/main.cc +++ b/src/main.cc @@ -556,6 +556,8 @@ int main( int argc, char ** argv ) QLocale locale( localeName ); QLocale::setDefault( locale ); + QApplication::setLayoutDirection( locale.textDirection() ); + if ( !qtTranslator.load( "qt_extra_" + localeName, Config::getLocDir() ) ) { qtTranslator.load( "qt_extra_" + localeName, QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ); app.installTranslator( &qtTranslator );