How can I control the InputMethod alternative words position on a custom widget.
-
Here is what I have done:
- I written a custom widget,which can accept input messages.
- I enabled input method by setAttribute(Qt:WA_InputMethodEnabled), so i can get the KeyPressEvent and InputMethodEvent.
- use my own engine to paint the input words.
There is a question in the case above. when I input Asian characters, the InputMethod will prompt a window, which display some alternative words. but I can not find a way to move the window to where I wanted to.
Anyone knows how to due this?
-
Here is what I have done:
- I written a custom widget,which can accept input messages.
- I enabled input method by setAttribute(Qt:WA_InputMethodEnabled), so i can get the KeyPressEvent and InputMethodEvent.
- use my own engine to paint the input words.
There is a question in the case above. when I input Asian characters, the InputMethod will prompt a window, which display some alternative words. but I can not find a way to move the window to where I wanted to.
Anyone knows how to due this?
@fasix What window is it? Is it your own? If so then take a look at http://doc.qt.io/qt-5/qwidget.html#pos-prop
-
@fasix What window is it? Is it your own? If so then take a look at http://doc.qt.io/qt-5/qwidget.html#pos-prop
-
@jsulm the window is not mine, It is the InputMethod prompted, here is a screen shot:
I tryied to use InputMethodQueryEvent, but it seems to helpless.
-
@fasix OK, you mean a pop-up. I don't know how you can influence its position, maybe somebody else can help.