Reputation: 64366
are there any ways to get current keyboard layout in Qt? Platform: Linux. Programming language: C++. Thanks.
Upvotes: 3
Views: 3582
Reputation: 3993
QLocale QInputMethod::locale()
should be used, which replaces the function QApplication::keyboardInputLocale()
suggested in the accepted answer (deprecated in 5.13, removed in 5.14)
Upvotes: 3
Reputation: 1
QLocale
C means the default and if you have an error in the code, I think the QLocale
header is not included. I had this previously.
Upvotes: 0
Reputation: 74272
This may be what you are looking for:
QLocale QApplication::keyboardInputLocale ()
Upvotes: 3