QInputMethod does not work properly on Linux.
-
Hi,
I have a problem with theQInputMethod::localeChanged
signal and theQInputMethod::locale()
method on Linux.
TheQInputMethod::locale()
always gives me the same result (looks like it just gives me a system locale)QLocale(English, Latin, UnitedStates)
.
And theQInputMethod::localeChanged
signal just never calls me my slot.QObject::connect( QGuiApplication::inputMethod(), &QInputMethod::localeChanged, [] { qDebug() << "localeChanged " << QGuiApplication::inputMethod()->locale(); });
This sample code works perfectly on Windows and macOS and does not on Linux.
Is there any a workaround solution?Thanks.
-
Hi and welcome to devnet,
Does not work on Linux is way too short.
What Linux distribution ?
What desktop environment ?
What graphical server ?
What version of Qt ?
Is it the distribution provided Qt ? -
Sorry for the missing details.
What Linux distribution ?
I tried on Ubuntu 14.04, Ubuntu 18.04, Linux Mint 17.3.
What desktop environment ?
Ubuntu — Unity. Mint — Mate.
What graphical server ?
X11.
What version of Qt ?
I tried 5.9, 5.12 and 5.14.
Is it the distribution provided Qt ?
5.9 was taken via
apt install
.
5.12 was compiled from sources.
5.14 was taken via an installer from qt.io. -
How are you triggering the locale change in Windows ?
-
@SGaist
It makes no difference how I do it:Win+Space
,Alt+Shift
(on Win 7) or by mouse via Input Indicator.