소스 검색

[iOS] clear focus in launcher only when something has focus

Andrey Filipenkov 3 년 전
부모
커밋
796845d173
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      launcher/mainwindow_moc.cpp

+ 2 - 1
launcher/mainwindow_moc.cpp

@@ -92,7 +92,8 @@ MainWindow::MainWindow(QWidget * parent)
 
 	connect(ui->tabSelectList, &QListWidget::currentRowChanged, [this](int i) {
 #ifdef Q_OS_IOS
-		qApp->focusWidget()->clearFocus();
+		if(auto widget = qApp->focusWidget())
+			widget->clearFocus();
 #endif
 		ui->tabListWidget->setCurrentIndex(i);
 	});