From 956ccec3ab91cca7ccbd0ab0f2c7fe88789ed76f Mon Sep 17 00:00:00 2001 From: jzxc95 <907297917@qq.com> Date: Thu, 16 Dec 2021 10:59:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8C=E5=87=BB=E4=BA=8B=E4=BB=B6=E4=BB=8D?= =?UTF-8?q?=E4=BC=9A=E8=A7=A6=E5=8F=91mousepressevent=3F=3F=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mobilehotspot/mobilehotspotwidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/mobilehotspot/mobilehotspotwidget.cpp b/plugins/mobilehotspot/mobilehotspotwidget.cpp index 2e3161ab..641a1b94 100644 --- a/plugins/mobilehotspot/mobilehotspotwidget.cpp +++ b/plugins/mobilehotspot/mobilehotspotwidget.cpp @@ -86,6 +86,10 @@ MobileHotspotWidget::~MobileHotspotWidget() bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event) { + if (event->type() == QEvent::MouseButtonDblClick && watched == m_switchBtn) { + return true; + } + if (event->type() == QEvent::MouseButtonPress) { if (watched == m_switchBtn) { if (!m_interface->isValid()) { @@ -97,7 +101,7 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event) } if (m_switchBtn->isChecked()) { showDesktopNotify(tr("start to close hotspot")); - QDBusReply reply = m_interface->call("deactiveWirelessAp", m_apNameLabel->text(), m_uuid); + QDBusReply reply = m_interface->call("deactiveWirelessAp", m_apNameLine->text(), m_uuid); if (!reply.isValid()) { qDebug() << "[MobileHotspotWidget] call deactiveWirelessAp failed "; return true;