Max Frai
Max Frai

Reputation: 64366

Qt - Keyboard layout

are there any ways to get current keyboard layout in Qt? Platform: Linux. Programming language: C++. Thanks.

Upvotes: 3

Views: 3582

Answers (3)

user202729
user202729

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

user1555142
user1555142

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

Alan Haggai Alavi
Alan Haggai Alavi

Reputation: 74272

This may be what you are looking for:

QLocale QApplication::keyboardInputLocale ()

Upvotes: 3

Related Questions