[Interest] mouse events: how to handle left and right button pressed?

Stephen Kelly stephen.kelly at kdab.com
Mon Mar 5 10:28:02 CET 2012

On Monday, March 05, 2012 13:39:37 Lincoln Ramsay wrote:
> On 03/05/2012 12:51 PM, ext Joseph Crowell wrote:
> > Also, I think your error is related to a missing include. Are you doing
> > #include<QMouseEvent>?
> No, the error is because C++ does not recognize (Qt::LeftButton |
> Qt::RightButton) as a constant. You can only use constant values in a
> switch statement.

Note that this works in Qt5 with a compiler which supports the C++11 constexpr 


Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120305/65371991/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120305/65371991/attachment.sig>

More information about the Interest mailing list