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

william.crocker at analog.com william.crocker at analog.com
Wed Sep 11 13:35:27 CEST 2013


On 09/11/2013 07:08 AM, 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?
>

You could try:

	 setAttribute(Qt::WA_TransparentForMouseEvents,true);

> Nate
> 09/11/2013
>
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list