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. 'mouseClick' : is not a member of 'QTest'
Forum Updated to NodeBB v4.3 + New Features

'mouseClick' : is not a member of 'QTest'

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.8k Views 2 Watching
  • 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.
  • K Offline
    K Offline
    kjoo
    wrote on last edited by
    #1

    I Visual Studio 2013, I am getting "'mouseClick' : is not a member of 'QTest'", even though I have checked "Test" in "QT Modules" in the QT Project Settings for the project, and #included <QTest> in the sourcecode.

    Funny thing is, it does recognize the QTest namespace and some of the methods like f.ex. "addColumn". But none of the mouse... or key... methods, so it's almost like only part of the namespace has been included.

    Is there anything else I need to include or set up to be able to use the rest of the methods (specifically, I need QTest::mouseClick)?

    BR. Kenneth.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Please check if you did this ?
      http://myprogrammingnotes.com/simulate-mouse-click-using-qt-test-lib.html

      K 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi
        Please check if you did this ?
        http://myprogrammingnotes.com/simulate-mouse-click-using-qt-test-lib.html

        K Offline
        K Offline
        kjoo
        wrote on last edited by
        #3

        @mrjj Thanks you. That worked.
        I ultimately ended up adding the following to Preprocessor definitions in Visual Studio. That way, I can just include <QTest>

        QT_TESTLIB_LIB
        QT_WIDGETS_LIB
        QT_GUI_LIB

        1 Reply Last reply
        1
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          super.
          If possible please mark as solved :)

          K 1 Reply Last reply
          0
          • mrjjM mrjj

            super.
            If possible please mark as solved :)

            K Offline
            K Offline
            kjoo
            wrote on last edited by
            #5

            @mrjj I think I did that.

            mrjjM 1 Reply Last reply
            1
            • K kjoo

              @mrjj I think I did that.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @kjoo
              Yes its green and nice :)

              1 Reply Last reply
              1

              • Login

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