yes yes, i know 
I intended to say that usually you do it by hand (in SDL it's like)
while (1) { // main loop
while (SDL_PollEvent(&ev)) {
switch (ev.type) {
// Handle here events
}
// Here game drawing loop
}
while (1) { // main loop
while (SDL_PollEvent(&ev)) {
switch (ev.type) {
// Handle here events
}
// Here game drawing loop
}
To copy to clipboard, switch view to plain text mode
While in qt the event polling is done by Qt; I'm saying that in Qt events are handled outside main loop because a Press method will be called on Press event.
To me, this is not only more readable and clear to write in code, but leaves also implementation freedom. If Qt a day will prefer to map directly system's event to my application, in this way there is no need to pass by an event queue, with SDL method it doesn't.
(well, it's quite ugly as example but i hope you got
)
Bookmarks