When a parent widget is defined with:
setWindowFlags(Qt::FramelessWindowHint | Qt::Popup);
Any edit box widget placed on top of it will not receive keyboard input. Mouse will work, right click, context menu, paste will work -- but not direct keyboard input. Any ideas why and how it can be fixed?
As I mentioned previously in a comment I had the same problem but now it is fixed with the following code:
// virtual override
void MyDialog::showEvent( QShowEvent* aShowEvent )
{
QDialog::showEvent( aShowEvent );
activateWindow();
}
After I added the activateWindow() function call I could use QLineEdit on my popup dialog.
I use Visual Studio 2013 and Qt 5.4.1 on Windows 8.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With