Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57630

Many examples do not work in Qt Creator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.7.1, 5.8.0 Beta
    • Documentation
    • None
    • Linux

    Description

      I think this warning "build directory must be at same level as source directory" is bogus. I routinely do shadow builds by hand and don't generally have to worry about which directory it's in. And it creates a catch-22 situation for running any examples on the welcome screen: if they are installed in some read-only location, e.g. /usr/share/doc/qt/examples/quick/demos/samegame my choices are

      1. copy the project (choose Copy Project and Open); but some of our examples depend on relative directories (e.g. samegame's main.cpp has #include "../../shared/shared.h" ), which are not copied, so such examples can't be built by copying the whole project, because it's incomplete. But at least some examples can be built that way.
      2. choose the "Keep Project and Open" button, which doesn't work at all because it's read-only
      3. check the shadow build checkbox, then it tries to create a build directory like /usr/share/doc/qt/examples/sql/build-masterdetail-system-Debug
      4. force it to do a shadow build by changing the build directory in the project settings - Creator complains, and then I get an error about not being able to create the .pro.user file, because it tries to create it in the (read-only) source directory; but otherwise it works. So why is this not recommended? When I do it by hand by creating a build dir, cd there, qmake /path/to/project.pro, make, and then open it in Creator, the .pro.user file ends up in the build directory rather than the source directory, which is good.

      Attachments

        1. cant-create-pro-user.png
          cant-create-pro-user.png
          6 kB
        2. copy-project-question.png
          copy-project-question.png
          19 kB
        3. warning.png
          warning.png
          35 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              docteam Qt Documentation Team
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes