Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-124749

QWidget does not receive mouse enter event when unactiver

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.3
    • None
    • macOS

    Description

      //代码占位符
      #include "widget.h"
      #include "./ui_widget.h"Widget::Widget(QWidget *parent)
          : QWidget(parent)
          , ui(new Ui::Widget)
      {
          ui->setupUi(this);
          setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
          setMouseTracking(true);
      }Widget::~Widget()
      {
          delete ui;
      }void Widget::enterEvent(QEnterEvent* event){
          qInfo() << "enter event";
          QWidget::enterEvent(event);
      } 

      When I set widget frame less and stay on top, it does not receive mouse enter event when the widget is not active

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            xp19870106 peng xu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes