Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QInputMethod does not work properly on Linux.
Forum Updated to NodeBB v4.3 + New Features

QInputMethod does not work properly on Linux.

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 404 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qt_user_342
    wrote on last edited by qt_user_342
    #1

    Hi,
    I have a problem with the QInputMethod::localeChanged signal and the QInputMethod::locale() method on Linux.
    The QInputMethod::locale() always gives me the same result (looks like it just gives me a system locale) QLocale(English, Latin, UnitedStates).
    And the QInputMethod::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.

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qt_user_342
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          How are you triggering the locale change in Windows ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          Q 1 Reply Last reply
          0
          • SGaistS SGaist

            How are you triggering the locale change in Windows ?

            Q Offline
            Q Offline
            qt_user_342
            wrote on last edited by
            #5

            @SGaist
            It makes no difference how I do it: Win+Space, Alt+Shift (on Win 7) or by mouse via Input Indicator.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved