qApp->focusWidget() null check
This commit is contained in:
@@ -141,6 +141,7 @@ bool InputObject::eventFilter(QObject* obj, QEvent* event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InputObject::ShowPanel() {
|
void InputObject::ShowPanel() {
|
||||||
|
if (!qApp->focusWidget()) return;
|
||||||
if (qApp->focusWidget()->inherits("QLineEdit"))
|
if (qApp->focusWidget()->inherits("QLineEdit"))
|
||||||
{
|
{
|
||||||
curLine = qobject_cast<QLineEdit*>(qApp->focusWidget());
|
curLine = qobject_cast<QLineEdit*>(qApp->focusWidget());
|
||||||
|
|||||||
Reference in New Issue
Block a user