virtualkeyboard can not be triggered by using touch screen
-
hi,
recently, I am using qtvirtualkeyboard as input method, but when I want use touch screen to edit QTextEdit content, the virtualkeyboard would not be triggered by touch the screen, but if i use mouse click the QTextEdit, the virtualkeyboard will come out
-
Hi,
Which version of Qt ?
On which device ?
Does the touchscreen work otherwise ?
Do you have the same issue for a QLineEdit ? -
Hi,
Which version of Qt ?
On which device ?
Does the touchscreen work otherwise ?
Do you have the same issue for a QLineEdit ? -
When you say all the same, do you mean none of them triggers the virtual keyboard ?
Is your touchscreen seen as a mouse ?
Can you interact with a button through it ? -
When you say all the same, do you mean none of them triggers the virtual keyboard ?
Is your touchscreen seen as a mouse ?
Can you interact with a button through it ?@SGaist thanks.
Yes, none of the editable widget triggers the virtual keyboard by touch screen, but can triggers the virtual keyboard by click mouse left button.
I use following code to check my touch screenvoid TextEdit::mousePressEvent(QMouseEvent *event) { qDebug() << __FUNCTION__ << event->button(); QTextEdit::mousePressEvent(event); }and it print " TextEdit::mousePressEvent Qt::LeftButton ", same as click mouse left button,
and I can use my touch screen to click button, it work with buttons -
When you say all the same, do you mean none of them triggers the virtual keyboard ?
Is your touchscreen seen as a mouse ?
Can you interact with a button through it ? -
Some more questions:
- are you using Qt's virtual keyboard ?
- does your touch screen act normally with your other applications ?
-
Some more questions:
- are you using Qt's virtual keyboard ?
- does your touch screen act normally with your other applications ?
@SGaist said in virtualkeyboard can not be triggered by using touch screen:
are you using Qt's virtual keyboard ?
hi
- I have use following command before running my application.
export QT_IM_MODULE=qtvirtualkeyboardand I can see qtvirtualkeyboard by clicking editable widget by mouse
- I tested my touch screen on gnome desktop with qt application, it worked, but if i run the qt application by x11 session directly , the qt application can detect left button clicked but can not focus the editable widget , and can not trigger the qt virtualkeyboard. but if I using mouse to trigger it once or call activateWindow() before showing the window, the virtualkey board can be triggered by my touch screen after that, but if i call activateWindow() the window will focus on my editable widget automaticly and the qt virtualkeyboard will also come out , I want to use the virtualkey board when I touch the editable widget.
thanks for your help
-
What do you mean by X11 session directly ?
-
@SGaist
I want to boot to qt application like embedded system, rather than boot to gnome desktop then run qt application.
so I changed the xsession configuration replace gnome desktop to run my qt application.
It is kind of like boot2qt (https://doc.qt.io/archives/qt-5.13-devicecreation/index.html) -
So one single application ?
Then you will likely have to do some configuration yourself with regards to input handling.See the Qt for embedded Linux chapter in Qt's documentation.
-
So one single application ?
Then you will likely have to do some configuration yourself with regards to input handling.See the Qt for embedded Linux chapter in Qt's documentation.
Yes, one single application, and thanks for your advice.
I am not sure I am using the right way to just run an application without desktop enviroment.
Do i need to change platform like eglfs or wayland? I am now using xcb, my system is ubuntu18.04 and my device is jetson tx2 -
If you do not want any desktop environment, eglfs would make more sense.