PDA

View Full Version : setWindowFlags(Qt::Popup) , mouse hover not working ?



tiaoweiliao
8th August 2016, 05:08
hi , all.

i use Qt 5.5.1 , Windows 7 64 bit , mingw492.

i use setWindowFlags(Qt::Popup) in my widget , but i found mouse hover event is not working.

How to solve it ?

if i use Qt 5.3.1 , There is no problem.

tiaoweiliao
9th August 2016, 10:13
This could be Qt bug , i don't know what to do now.

Can anybody help me?

anda_skoa
9th August 2016, 10:30
Yes, if it worked in an older version it could very well be a bug.

Can you create a small test program and attach it?
Maybe someone can find a solution or workaround.

Cheers,
_

tiaoweiliao
10th August 2016, 03:27
thanks, My program is very simple.

//in MainWindow constructor , W_Widget Inherits QWidget
W_Widget * myPopupWidget = new W_Widget(this);
myPopupWidget->setWindowFlags(Qt::Popup);
myPopupWidget->show();

//in w_widget.cpp
W_Widget::enterEvent(QEvent * e){
qDebug()<<"enterEvent.";
}

no output information in Qt5.5.1, but There is no problem before Qt5.5.1.

anda_skoa
10th August 2016, 10:26
Sorry, I wasn't clear enough.
I meant attaching a ZIP or similar with a program that can actually be built and run.

In any case, have you tried enabling "mouse tracking" on the popup widget?

Cheers,
_

tiaoweiliao
13th August 2016, 08:39
thanks , i use Qt5.4.2 is no problem.