Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8342627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:49:37+00:00 2026-06-09T05:49:37+00:00

Maybe I’m missing something, but it seems really stupid to me that the only

  • 0

Maybe I’m missing something, but it seems really stupid to me that the only tutorial provided for QtTest framework has you testing the QString class.

The typical use case for unit testing is….testing classes you wrote yourself, but there is no mention on how to reference your classes in a different project for testing in the tutorial and google has failed me as well(and I really doubt copy pasting classes is a good way to do it).

I even thumbed through 3 different Qt books with no mention of QtTest.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:49:39+00:00Added an answer on June 9, 2026 at 5:49 am

    You can add include paths to other project directories in your .pro file like so:

    INCLUDEPATH += <directory>
    

    Then it should be able to find the headers that you are including.

    Edit: Based on comment

    That’s another story altogether. Undefined reference usually means you are missing a dependency. This can usually be resolved with one of two things.

    The simplest is to include the missing source file:

    INCLUDEPATH += ../myotherproject/
    SOURCES = main.cpp ../myotherproject/missingsource.cpp
    

    Perhaps the better solution is to expose reusable code by compiling it as a library and linking to it. E.g. a .DLL or .LIB on Windows and .SO or .A on Linux.

    INCLUDEPATH += ../myotherproject/
    win32:LIBS += ../myotherproject/linkme.lib
    

    Can you show us the specific errors you are getting?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe I'm missing something obvious, or maybe something sinister is happening, but this seems
Maybe that's only possible with SQLITE but is there also a trick to let
Maybe this is something I am just missing, but is there any way to
Maybe I am missing something, but they seem similar. If you use for example...
Maybe I'm missing something but why does visual studio break execution to tell me
Maybe I am missing something entirely simple here, but in any new windows form
Maybe I missed something really obvious but this code doesn't work: <pre> <?php print_r(($progress));
Maybe I'm missing something obvious, but is there a simpler way to check if
Maybe my title is not the best but here is what I really want.I
Maybe this is a poor question, but, I can't find a tutorial or even

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.