Key buffer issue with my QWizard program
-
It's something strange.. let's say that in the wizardpages where there are QPushButtons, the Wizard's nextButton is disabled and the first QPushButton is focused while in the wizardpages that just contain/show information, the next button is enabled and focused so no matter in which page you are, if I press enter many times it skips the pages... (Imagine that when you press enter in WP1 some information is saved and some things done so it takes 2-3 seconds to change to the next WP (which is ok) but in that seconds you press Enter 4 times more.... then you will see WP5 instead of WP2). Hope it is clearer now :)
-
@roseicollis
Hello,Imagine that when you press enter in WP1 some information is saved and some things done so it takes 2-3 seconds to change to the next WP (which is ok) but in that seconds you press Enter 4 times more.... then you will see WP5 instead of WP2). Hope it is clearer now
Well, I'd guess you're blocking the event loop and when you after you switch the pages Qt processes the pending events so they get switched yet again. Could you check what happens if you call
QApplication::processEvents()
immediately before you switch to the next page?Kind regards.
-
@kshegunov said:
Could you check what happens if you call QApplication::processEvents() immediately before you switch to the next page?
What should I expect? It's like if it did nothing... should I see a change?
Anyway I've found that there is another problem with that: If I press Enter WITHOUT releasing the key, its the same as press it infinity times so I guess this is my main problem right now because there are some users that press Enter so slowly that keep it pushed some secs...
-
@roseicollis said:
What should I expect? It's like if it did nothing... should I see a change?
You'd expect the key events be processed before switching the page. However this as it seems might not be enough.
Can you share the code where you switch from one page to the next (the Qt part of it, not what you do with the user data)?Anyway I've found that there is another problem with that: If I press Enter WITHOUT releasing the key, its the same as press it infinity
Holding the
Enter
key will put events in the event loop queue and their number depends on the time you'd been holding the key.Kind regards.
-
@kshegunov said:
You'd expect the key events be processed before switching the page. However this as it seems might not be enough.
No, it seems its not but don't worry, my mate told me he has desactivated it on the system so I don't have to deal with that problem anymore :D
Thank you for all @kshegunov !!
-
@roseicollis
No problem. Don't forget to mark your topic as solved (I know it seems tedious, but it looks good on the forum to have more blue than green ;)).Kind regards.
-
@kshegunov isn't it marked? I marked it before writting the answer :S (The other topic I have about the dialog, I had to write solved on the title because the "Mark as Solved" option does not appear on Topic Tools dunno why.. and also I lost my pic here and I can't load a new none :( )
-
@roseicollis
Possibly my view hadn't updated.The other topic I have about the dialog, I had to write solved on the title because the "Mark as Solved" option does not appear on Topic Tools dunno why
Maybe you hadn't created is as a "question" topic and that's why the option weren't available in the topic tools. As for the picture, the only possibility is to setup a Gravatar account with your forum email and select the option in the profile, uploads are disabled.
-
@kshegunov said:
Maybe you hadn't created is as a "question" topic
O.o is there any other type of question? Maybe I did it wrong... :S
setup a Gravatar account with your forum email and select the option in the profile
I don't get why can't you upload a pic like before and you have to use that which I suppose is another webpage... but this is not the properly place to discuss something like that... Ty @kshegunov ^^
-
O.o is there any other type of question? Maybe I did it wrong... :S
There's a "general topic" and a "question topic".
I don't get why can't you upload a pic like before and you have to use that which I suppose is another webpage...
Look here.