2

Is it possible to make Qt Quick application to continue input, while TextField is in the non-modal Dialog, which parented to some of children of an ApplicationWindow and InputPanel is a footer of the window?

Currently on desktop (Ubuntu 16.04 w/ GNOME) Dialog is QDialog widget-based. And when I touch virtual keyboard the Dialog lost focus and virtual keyboard became inactive because of enabled property defined as follows:

footer: InputPanel {
    enabled: Qt.inputMethod.visible
}

It is a circulus vituosus. Either I need a latest fallback from cite (the cite if for FileDialog, but it may still be actual for Dialog):

The implementation of FileDialog will be a platform file dialog if possible. If that isn't possible, then it will try to instantiate a QFileDialog. If that also isn't possible, then it will fall back to a QML implementation, DefaultFileDialog.qml. In that case you can customize the appearance by editing this file. DefaultFileDialog.qml contains a Rectangle to hold the dialog's contents, because certain embedded systems do not support multiple top-level windows. When the dialog becomes visible, it will automatically be wrapped in a Window if possible, or simply reparented on top of the main window if there can only be one window.

Or I need a way to touch virtual keyboard, but not lost focus from a Qt Quick Control.

Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169
  • You could try to fake the input. It will be a little complicated, much work, and I don't know if you can cover all usecases... Create a proxy `TextField` or similar, that is invisible in the same window as the keyboard. When you click in the `Dialog` set the focus of that `TextField`. Use the `TextField`s text as model for your dialog's text. Do some extra work, so you have a proper edit behavior (clicking somewhere in the middel of the text to change cursor position of the hidden text field... Don't know if and how this can be done. Don't have time for research) – derM - not here for BOT dreams Jul 27 '17 at 09:08
  • We have the same problem: any solution appeared here since 2.5 years passed? Thanks! – Aleksey Kontsevich Jan 06 '20 at 14:27
  • @AlekseyKontsevich I think I ended up with `DontUseNativeDialog`, don't remember. – Tomilov Anatoliy Jan 07 '20 at 08:19
  • @TomilovAnatoliy does not work for me: could You find and provide some code example please? Thanks! – Aleksey Kontsevich Jan 07 '20 at 09:53
  • I can't find code example. – Tomilov Anatoliy Jan 07 '20 at 15:20

0 Answers0