[Interest] Why QLabel block mouseReleaseEvent when holds rich text?

nate.yuan at gmail.com nate.yuan at gmail.com
Thu Sep 12 04:24:49 CEST 2013

At 2013-09-11 22:50:03,"Thiago Macieira" <thiago.macieira at intel.com> wrote: >On quarta-feira, 11 de setembro de 2013 19:08:35, nate.yuan at gmail.com wrote: >>  Hi guys, >>  >>         I have a frameless dialog and implement the title bar by myself. I >> implement the mousePressEvent, mouseReleaseEvent and mouseMoveEvent of the >> dialog, so users can drag the dialog. Every thing works fine until I put a >> QLabel, which holds rich text,  on the title bar. The QLabel blocks the >> mouseReleaseEvent, so the dialog's mouseReleaseEvent() will never be >> called. When I use plain text in the QLabel, every thing works fine. >>  >>         Is this a bug of QLabel?  Or do I miss something? > >Probably not a bug. Do you get the mousePressEvent? The release event is  >always sent to the same widget that accepted the mouse release. And QLabel  >with rich text might contain links, so it may need to handle mouse presses.

Thanks Thiago, I got it.


 > >--  >Thiago Macieira - thiago.macieira (AT) intel.com >  Software Architect - Intel Open Source Technology Cente
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130912/17f83553/attachment.html>

More information about the Interest mailing list