Hello!
I'm using QSFMLWidget from 1.x turorual which I have got working with SFML2.3.
On implementing event handling system I've faced a strange error.
X Extensions:
Generic Event Extension - First event: 0
SHAPE - First event: 64
MIT-SHM - First event: 65
XInputExtension - First event: 66
XTEST - First event: 0
BIG-REQUESTS - First event: 0
SYNC - First event: 83
XKEYBOARD - First event: 85
XC-MISC - First event: 0
XFIXES - First event: 86
RENDER - First event: 0
RANDR - First event: 88
XINERAMA - First event: 0
Composite - First event: 0
DAMAGE - First event: 90
MIT-SCREEN-SAVER - First event: 91
DOUBLE-BUFFER - First event: 0
RECORD - First event: 0
DPMS - First event: 0
Present - First event: 0
DRI3 - First event: 0
X-Resource - First event: 0
XVideo - First event: 92
XFree86-VidModeExtension - First event: 0
XFree86-DGA - First event: 94
DRI2 - First event: 101
GLX - First event: 103
NV-GLX - First event: 0
NV-CONTROL - First event: 120
Unhandled event type: 0
Report this to the SFML maintainers if possible
Here is my function:
void QSFMLCanvas::OnUpdate()
{
sf::Event event;
while (pollEvent(event)) {
switch(event.type)
{
case (sf::Event::MouseButtonPressed) :
qDebug() << "mouse clicked"; // Event never handled
//mousePressedEventHandling(event);
break;
case (sf::Event::MouseMoved) :
qDebug() << "mouse moved"; // Event handled
//mouseMovedEventHandling(event);
break;
case (sf::Event::KeyPressed) :
qDebug() << "key pressed"; // Event handled
break;
default:
break;
}
}
// Clear screen
clear(sf::Color(0, 0, 0));
engine.render();
}
As I can see in my console, none of the events are handled.
I'm using Linux.