INNER CODE UNIT · C++

mousePos

zhangdoa/InnocenceEngine · Source/Editor/adjustlabel.cpp:72

    QPoint mousePos = this->mapFromGlobal(QCursor::pos());
    return mousePos;
}

void AdjustLabel::RepositionMouseOnScreenEdge()
{
    QPoint mousePos = QCursor::pos();
    QRect screen = QApplication::primaryScreen()->geometry();

    if (mousePos.x() == 0)
    {
        QPoint newMousePos = QPoint(screen.width(), mousePos.y());
        QCursor::setPos(newMousePos);
        m_lastMousePos = GetMousePosLocal().x();
    }

    if (mousePos.x() == screen.width() - 1)
    {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…