<div dir="ltr"><div dir="ltr">Il giorno mer 5 mag 2021 alle ore 19:32 Luca Bertolotti <<a href="mailto:luca72.bertolotti@gmail.com">luca72.bertolotti@gmail.com</a>> ha scritto:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">i have as follow and in the label i never read the text:<div>if i comment the 

 self.label_10.installEventFilter(self) i read the text</div><div></div></div></blockquote></div><div><br></div>With "I never read the text" do you mean that it isn't displayed? Please be more specific in your questions, "read" can mean a lot of things.<div><br>Assuming the above (the text is not *displayed*), that's because you're always returning True (1) from the event filter.</div><div>An eventFilter should not always return 1 (or True), but it should always call the default implementation instead (<font face="monospace">return super().eventFilter(object, event)</font>) as some events should **NOT** be handled by the filter, depending on the event *and* the widget. In this specific case, by always returning True the result is that you're **ignoring** the paint event of the label, which is responsible of *drawing* the contents of the label. Calling the default implementation of the event filter instead ensures that the basic event filter of QObject calls any other possible event filter, and if the return value is False that means: the event hasn't been filtered, so proceed with the default implementation given by the objects event(event) call. In this case, call the paintEvent.</div><div><br></div><div>Maurizio</div><div>-- <br><div dir="ltr" class="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div></div></div>