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. Unit Testing
Forum Update on Monday, May 27th 2025

Unit Testing

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 1.9k 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.
  • A Offline
    A Offline
    Amara
    wrote on 9 Mar 2017, 08:27 last edited by
    #1
                          How we can Test  the FocusIn, Focus out events, mouse events, keyboard events, signals & slots in unit testing.
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 9 Mar 2017, 09:51 last edited by
      #2

      Hi,

      Please take a look at the QTest tutorial, it shows the basics for GUI testing.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • A Offline
        A Offline
        Amara
        wrote on 9 Mar 2017, 11:34 last edited by
        #3

        Thanks for your updation. Already researched those things, Need some examples regarding on it.

        J 1 Reply Last reply 9 Mar 2017, 11:57
        0
        • A Amara
          9 Mar 2017, 11:34

          Thanks for your updation. Already researched those things, Need some examples regarding on it.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 9 Mar 2017, 11:57 last edited by
          #4

          @Amara Examples for what?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Amara
            wrote on 9 Mar 2017, 12:06 last edited by
            #5

            Test the widgets like button , check box for FocusIn, Focus out events, mouse events, keyboard events & signals in unit testing.

            N 1 Reply Last reply 9 Mar 2017, 12:10
            0
            • A Amara
              9 Mar 2017, 12:06

              Test the widgets like button , check box for FocusIn, Focus out events, mouse events, keyboard events & signals in unit testing.

              N Offline
              N Offline
              Ni.Sumi
              wrote on 9 Mar 2017, 12:10 last edited by
              #6

              @Amara

              You want to test some thing whether are there working (like playing around) or some other way?? You can make small samples to test them or play around. check the Qt examples, or use you ca use qDebug.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Amara
                wrote on 9 Mar 2017, 12:14 last edited by
                #7

                If anyone has example in the unit testing. Please update.

                N 1 Reply Last reply 9 Mar 2017, 12:41
                0
                • A Amara
                  9 Mar 2017, 12:14

                  If anyone has example in the unit testing. Please update.

                  N Offline
                  N Offline
                  Ni.Sumi
                  wrote on 9 Mar 2017, 12:41 last edited by Ni.Sumi 3 Sept 2017, 12:48
                  #8

                  @Amara

                  check this http://programmingexamples.net/wiki/Qt

                  Edit::
                  http://www.codeprogress.com/cpp/libraries/qt/index.php
                  Also the Qt4 book has many examples for unit testing. It's like learning Qt while writing small codes.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Amara
                    wrote on 9 Mar 2017, 12:47 last edited by
                    #9

                    @Ni.Sumi

                    Thanks a lot but iam expecting examples of unit testing for focus in , focus out keyboard events not the coding styles.

                    J 1 Reply Last reply 9 Mar 2017, 13:02
                    0
                    • A Amara
                      9 Mar 2017, 12:47

                      @Ni.Sumi

                      Thanks a lot but iam expecting examples of unit testing for focus in , focus out keyboard events not the coding styles.

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 9 Mar 2017, 13:02 last edited by
                      #10

                      @Amara Focus in/out means: click on it or select via keyboard (tab key) - this can be done using QTest::keyClick for example.
                      For keyboard: QTest::keyEvent
                      For more details see http://doc.qt.io/qt-5/qtest.html
                      Not sure why you insist on having examples, I don't have any here.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      2

                      1/10

                      9 Mar 2017, 08:27

                      • Login

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