hovering over child widgets, Qt::WA_NoMousePropagation not working
-
Hi
Yes you are right. it should only hover one.
Do you use class Label : public QLabel as the window ? ( and no mainwindow)
(going to test it) -
No, thats actually a bigger project, this was just a small illustrative example.
I have ofc. a mainwindow and so on...
I noticed this problem when i put a ComboBox(as selector) inside a StackedWidget. I am subclassing the widgets directly in order to inherit all the public members.
I did something like this ...class StackedWidget : public QStackedWidget { StackedWidget(...) {analogous to above example} QComboBox pageComboBox; }
-
Hi
I agree - its a bit odd.
QLabel might have some special flag.
Did you try with Qwidgets ? -
Hi
Seems parent widget always get a hover when you enter its area even if a child
is covering the entry area
Not sure its a bug or by design. Lets see what others say.
-
Hi,
Can you share your test sample ?
-
-
It is used in QComboBox.
Did you already saw the QHoverEvent description especially the part about propagation ?
-
It is used in QComboBox.
Are you sure ? , because its not working for my QComboboxes neither!
Mouse is over the left history button in this picture.Did you already saw the QHoverEvent description especially the part about propagation ?
I did. This link is actually also in my original question.
-
Hi
The sample sets Qt::WA_NoMousePropagation on "CHILD"
in mainwindows ctor but it made no difference.The CHILD label seems to be aligned with Parents client rect and in theory
cursor should be able to enter the CHILD directly but i suspect the truth is
that entering a widget always enters the parent first regardless of the visual
representation.