MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / mousePressEvent

Method mousePressEvent

Src/FrmViewer.cpp:178–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void CFrmViewer::mousePressEvent(QMouseEvent *event)
179{
180 QPointF pos =
181#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
182 event->position();
183#else
184 event->pos();
185#endif
186
187 if(TranslationMousePoint(pos, pos)) return;
188 // event->buttons() 产生事件时,按键的状态
189 // event->button() 触发当前事件的按键
190 qDebug(logMouse) << "CFrmViewer::mousePressEvent"
191 << event << event->button() << event->buttons() << pos;
192 emit sigMousePressEvent(event, QPoint(pos.x(), pos.y()));
193 event->accept();
194
195 if(testAttribute(Qt::WA_InputMethodEnabled)
196 && event->button() == Qt::LeftButton) {
197 qDebug(logInputMethod) << Q_FUNC_INFO << "Update micro focus";
198 updateMicroFocus();
199 }
200}
201
202void CFrmViewer::mouseReleaseEvent(QMouseEvent *event)
203{

Callers

nothing calls this directly

Calls 1

acceptMethod · 0.45

Tested by

no test coverage detected