Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Key buffer issue with my QWizard program

Key buffer issue with my QWizard program

Scheduled Pinned Locked Moved Solved General and Desktop
qwizardqwizardpagekeysbuffer
12 Posts 3 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    roseicollis
    wrote on last edited by
    #3

    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 :)

    kshegunovK 1 Reply Last reply
    0
    • R roseicollis

      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 :)

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #4

      @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.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        roseicollis
        wrote on last edited by
        #5

        @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...

        kshegunovK 1 Reply Last reply
        0
        • R roseicollis

          @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...

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by kshegunov
          #6

          @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.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          0
          • R Offline
            R Offline
            roseicollis
            wrote on last edited by
            #7

            @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 !!

            kshegunovK 1 Reply Last reply
            0
            • R roseicollis

              @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 !!

              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by
              #8

              @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.

              Read and abide by the Qt Code of Conduct

              R 1 Reply Last reply
              0
              • kshegunovK 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.

                R Offline
                R Offline
                roseicollis
                wrote on last edited by
                #9

                @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 :( )

                kshegunovK 1 Reply Last reply
                0
                • R roseicollis

                  @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 :( )

                  kshegunovK Offline
                  kshegunovK Offline
                  kshegunov
                  Moderators
                  wrote on last edited by
                  #10

                  @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.

                  Read and abide by the Qt Code of Conduct

                  R 1 Reply Last reply
                  0
                  • kshegunovK kshegunov

                    @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.

                    R Offline
                    R Offline
                    roseicollis
                    wrote on last edited by
                    #11

                    @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 ^^

                    kshegunovK 1 Reply Last reply
                    0
                    • R roseicollis

                      @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 ^^

                      kshegunovK Offline
                      kshegunovK Offline
                      kshegunov
                      Moderators
                      wrote on last edited by
                      #12

                      @roseicollis

                      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.

                      Read and abide by the Qt Code of Conduct

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved