I've experimenting with some silly codes. Doing the 'you-know-what-cibersheep-is-interested-in' apps. And the positive of using tools-from-the-Devil is I've 'found' a way of doing things I didn't know before:
The ones
This, I like 🙂
OSK closed after onAccepted()
This drove me crazy for a while for text adventure, it is annoying that TextField loses focus and OSK goes away. So you have to click again on the text field to type.
There's three ways of doing that: the ugly, the qml nice and one line, and the cpp what-is-the-Terminal-doing:
1- unfocus and refocus I'm mastering the focus here. Don't use it, it's aggressive and probably clashes with other uses of the app.
2- The input method has to be multiline ¬¬ Why I didn't know about this? Because I didn't understand (read) the Qt documentation
TextField {
inputMethodHints: Qt.ImhMultiLine
}
You can mix it with no predictive text, that messes with some aspects of the item: inputMethodHints: Qt.ImhMultiLine | Qt.ImhNoPredictiveText
3- Having a cpp element that accepts focus and... no, really, I don't understand this. The basic concept is that the exposed element in the qml has to accept focus. Then, you can invoke the osk and it stays while the element has focus (exactly like if it was a qml item)
I was so happy to see this working that asked my Agent to export the way of doing that in a document
QtWebEngine resizes
I also went bananas with this one. I fought everywhere for the escalation and zoom, and what not. And actually is disabling the pinch ¬¬
- Modify the desktop file to include:
Exec=env QTWEBENGINE_CHROMIUM_FLAGS=--disable-pinch [name of your app]