Opening QVitualKeyboard automatically when opening a popup window
Unsolved
General and Desktop
-
Hello
I have a textEdit that when click upon the textedit the QvirtualKeyboard hovers over it. My fix for this was a pop up window that opens. The issue now is that when opening the window you have to press on the textedit again which is annoying. So how could I make the QVirtualKeyboard come on screen when the pop up window opens?
I already tried this:
void PopUpWindow::showEvent(QShowEvent *) { OpenKeyboard(); } void PopUpWindow::OpenKeyboard() { m_pUi->textEdit->setFocus(); qGuiApp->inputMethod()->show(); }
But this occasionally opens the keyboard but then it immediatly closes again.
Kind regards
Yina