Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Unit testing, versioning and books
Qt 6.12 LTS is out! See what's new in the release blog

[SOLVED] Unit testing, versioning and books

Scheduled Pinned Locked Moved General and Desktop
12 Posts 3 Posters 4.5k Views 1 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi all,
    I'm a beginner using Qt.
    Until now I've developed using mostly (VB | C#) & .Net Framework.
    I'm writing this post to ask for few suggestions.

    1 Unit tests
    I'm trying to realize an example of a c++ library project with the related unit tests.
    I'd like to know which is the best way to keep separated the library and the tests?
    Is there any good example of unit testing (I mean something more complicated respect the ones in the tutorials)?

    2 Code versioning for cross-plartrom deploy
    I've planed to deploy an application on Windows7 and MacOSx.
    My idea is to use svn to keep the source code sincronized on two computers (win & mac) and to deploy the application on each of them.
    Is this a good idea?
    Are there other ways to deploy on two platforms?

    1. I'm looking for a good book to use as a reference for Qt Libraries.
      Can someone suggest me a good book.

    Thanks in advance
    Boris

    1 Reply Last reply
    0
    • francescmmF Offline
      francescmmF Offline
      francescmm
      wrote on last edited by
      #2

      Referencing to the points 2 and 3:

      1. It's the best idea. I am using a svn server as repository to control versions. As example, I use one laptop with Mandriva, another pc with W7 and a virtual machine with XP for testing.

      2. There are two good books for Qt that can be you useful:

      • C++ GUI Programming with Qt 4 (2nd Edition) (Jasmin Blanchette & Mark Summerfield)
      • Advanced Qt Programming (Mark Summerfield)
      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        You've problably found this, but I quite like the tutorial from docs: "QTestLib":http://qt-project.org/doc/qt-4.8/qtestlib-tutorial.html.

        SVN is ok, although I would recommend git - it's better in almost every way.

        Qt Project "books section":https://qt-project.org/books has a nice selection. There are no books on Qt5 and QML currently, all entries there are therefore about Qt < 4.7.0. They are still very good, of course, Qt5 is almost fully source-compatible.

        (Z(:^

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Clarification on question 1:
          The most important aim is to find a best practice to keep separated the library and the tests?

          Thanks to francescmm & sierdzio

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            Check out Qt sources: source code and test code are separated and using different QMake subproject trees.

            (Z(:^

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              Or see my "QtWebService":https://github.com/sierdzio/qtwebservice for a simpler and smaller code ;) Qt sources can be quite overwhelming.

              (Z(:^

              1 Reply Last reply
              0
              • francescmmF Offline
                francescmmF Offline
                francescmm
                wrote on last edited by
                #7

                I think that is mandatory, since the library could change and I think that the tests can be a separated console app or script.

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #8

                  I've downloaded QtWebService,
                  Now I start to study it ;)
                  @sierdzio & @francescmm - Thanks again

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #9

                    [quote author="sierdzio" date="1368791150"]Or see my "QtWebService":https://github.com/sierdzio/qtwebservice for a simpler and smaller code ;) Qt sources can be quite overwhelming.[/quote]
                    @sierdzio
                    Great example !
                    Thanks a lot ;)

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #10

                      @sierdzio
                      I'm trying to rebuild QtWebService using Qt 5.0 but I get some issues like "toAscii is not a member of QString"
                      Is there any workaround to solve this issue?
                      Thanks in advance
                      Boris

                      1 Reply Last reply
                      0
                      • sierdzioS Offline
                        sierdzioS Offline
                        sierdzio
                        Moderators
                        wrote on last edited by
                        #11

                        I'm not working on this project anymore. toAscii() was removed in Qt5. You can change all occurrences to QString::toLatin1().

                        (Z(:^

                        1 Reply Last reply
                        0
                        • ? Offline
                          ? Offline
                          A Former User
                          wrote on last edited by
                          #12

                          I've found a good introduction video at "this link":http://qt-project.org/videos/watch/introduction_to_automated_testing_for_qt_applications
                          Thanks to all
                          Boris

                          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
                          • Unsolved