When in a QWidget and Input Widget ?
I have an application that uses a QWizard and a virtual keyboard.
The QWizard has a series of QWizardPage derived classes for pages, in each case the form has a QWidget as its top item.
For some pages, making the form visible causes the virtual keyboard to appear, but not in others.
So my question would be, why ? When looking up inputMethodHints, it comments how this applies to input widgets. I am assuming that being an "input widget" is why the virtual keyboard is deciding to show up, but I cannot see any property difference between that QWidget based pages where the keyboard shows, and the QWidget based pages where the keyboard does not show.
I am hoping someone has an idea so I can fix this is a more proper manner.
What are the difference between these pages ?
Which type of widgets do you have on them ?
An example of a non-keyboard page is relatively simple, it just has a collection of labels and buttons.
An example of a keyboard generating page is more complex.
- Several buttons
- A widget with a label and some buttons
- Another widget (replicated several times) with buttons, labels, and a list widget
- A widget with labels buttons and a list widget.
Neither screen has any text input fields.
Oddly enough on the QT4 version of these, while we have a QInputContext based virtual keyboard for some text edit fields we have, we do not get keyboard on these pages.
I am wondering whether it's to allow changing the focus with the tab button of the keyboard.
That might be possible, as we are basically on the default settings on the Widets.
But in both cases, the top widget is set No Focus, but the Buttons within are set to Strong Focus.
Strong focus might be the key here. Try without it just to check.
I adjusted all the widgets in the window from Strong Focus to Click Focus. That had no effect.
I should also note that the window that does not generate a virtual keyboard has Strong Focus settings on its buttons as well.
Which version of Qt are you using ?
Can you provide a minimal compilable example that shows this behaviour ?
I am using QT 5.12.5. I doubt I can provide a good example as this is in a complicated app and without a clue as to why distilling down to an distributable example would be difficult, unforunately.
In that case the other possibility is to replace your existing widget with an empty one and rebuild the interface on widget after the other see where it starts acting up.