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

2012-03-04 Thread Lincoln Ramsay
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? 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. -- L

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

2012-03-04 Thread Joseph Crowell
Also, I think your error is related to a missing include. Are you doing #include ? On 3/4/2012 12:46 PM, Philipp Menke wrote: > why dont you use: > > if (event->buttons() == (Qt::LeftButton | Qt::RightButton) ) > { > std::cerr<< "both"<< std::endl; > } >else if ( event->buttons() == Q

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

2012-03-04 Thread Joseph Crowell
On 3/4/2012 12:46 PM, Philipp Menke wrote: > why dont you use: > > if (event->buttons() == (Qt::LeftButton | Qt::RightButton) ) > { > std::cerr<< "both"<< std::endl; > } >else if ( event->buttons() == Qt::LeftButton) > { > std::cerr<< "left"<< std::endl; > } > else if ( event->b

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

2012-03-04 Thread Philipp Menke
why dont you use: if (event->buttons() == (Qt::LeftButton | Qt::RightButton) ) { std::cerr << "both" << std::endl; } else if ( event->buttons() == Qt::LeftButton) { std::cerr << "left" << std::endl; } else if ( event->buttons() == Qt::RightButton) { std::cerr << "right" << std::en

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

2012-03-04 Thread Rui Maciel
I'm trying to handle mouse events which include the case where multiple mouse buttons are pressed. The reference page on QMouseButton[1] states that "[t]he button state is a combination of Qt::LeftButton , Qt::RightButton

Re: [Interest] [CMake] Problems with CMake and static Qt plugins

2012-03-04 Thread norulez
@Michael: This was a copy/paste failure @Thiago: QT_STATICPLUGIN does the trick Another mistake from me was to use a different name for Q_IMPORT_PLUGIN and for Q_EXPORT_PLUGIN2. One more hint, if someone would make a static plugin is to use the QPluginLoader::staticInstances() function. Thank