Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Pressing ALT+CAPSLOCK when Japanese IME keyboard is active highlights QMenu items, losing focus from editor.

    General and Desktop
    qmenu qmainwindow qtextedit pyside6
    1
    1
    144
    Loading More Posts
    • 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.
    • S
      Squeakychu last edited by

      Hello. I'm creating a translation app that takes text from one language, and translates it to another, such as Japanese to English. With Japanese in particular I use CTRL+CAPSLOCK and ALT+CAPSLOCK to switch between hiragana and katakana respectively.

      This isn't a problem in most apps. However, within my app, while the Japanese IME keyboard is active, whenever I press ALT+CAPSLOCK to switch to katakana, it also highlights the QMenu item, moving the focus away from the textbox and preventing me from typing until I either click in it again, or press alt again, which is very inconvenient when in the middle of typing a foreign language.

      6b5e58c5-1b5c-4c60-b883-a77b165ddacc-image.png

      I haven't been able to find anything on how to disable this functionality within a python qt app for a QMainWindow object (PySide6 v6.1.2). Furthermore, I see this used to be a bug that was apparently fixed as of 5.9.0 (https://bugreports.qt.io/browse/QTBUG-46812). I'm wondering if this is also a bug, and it wasn't taken into account when the fix was originally implemented. If it is a bug, I'm wondering if I should create a new issue for this in JIRA under QTBUG project.

      Aside from that, is there any way I would be able to programmatically work around this issue within the app itself by disabling ALT? Thanks!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post