Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Creator does not see examples; also can't build them, because of permissions.
Forum Updated to NodeBB v4.3 + New Features

Qt Creator does not see examples; also can't build them, because of permissions.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
15 Posts 4 Posters 3.4k 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.
  • StokestackS Offline
    StokestackS Offline
    Stokestack
    wrote on last edited by Stokestack
    #1

    I built Qt 5.15.0 and Qt Creator 4.13.0-beta1 (although I didn't know that I was building the beta), and I seem to have most things linked up. But Qt Creator doesn't see the examples, which are installed (per default) in /usr/local/Qt-5.15.0/examples.

    If I navigate there and open an example explicitly, I can't build it because of this:

    /usr/local/Qt-5.15.0/mkspecs/features/mac/sdk.prf:60: error: Cannot write cache file /usr/local/Qt-5.15.0/examples/serialport/enumerator/.qmake.stash: Permission denied

    This is under Mac OS 10.15.5.

    JKSHJ 1 Reply Last reply
    0
    • StokestackS Stokestack

      I built Qt 5.15.0 and Qt Creator 4.13.0-beta1 (although I didn't know that I was building the beta), and I seem to have most things linked up. But Qt Creator doesn't see the examples, which are installed (per default) in /usr/local/Qt-5.15.0/examples.

      If I navigate there and open an example explicitly, I can't build it because of this:

      /usr/local/Qt-5.15.0/mkspecs/features/mac/sdk.prf:60: error: Cannot write cache file /usr/local/Qt-5.15.0/examples/serialport/enumerator/.qmake.stash: Permission denied

      This is under Mac OS 10.15.5.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @Stokestack said in Qt Creator does not see examples; also can't build them, because of permissions.:

      If I navigate there and open an example explicitly, I can't build it because of this:

      /usr/local/Qt-5.15.0/mkspecs/features/mac/sdk.prf:60: error: Cannot write cache file /usr/local/Qt-5.15.0/examples/serialport/enumerator/.qmake.stash: Permission denied

      Check if you have write permissions for /usr/local/Qt-5.15.0/examples/ and all its subdirectories.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • StokestackS Offline
        StokestackS Offline
        Stokestack
        wrote on last edited by
        #3

        Thanks for the reply.

        Undoubtedly I don't, but this raises the question: What is the expected user experience here? This is the default installation directory, so it seems that it would always present the same problem.

        And there's still the question of why Creator doesn't see the examples...

        JKSHJ 1 Reply Last reply
        0
        • StokestackS Stokestack

          Thanks for the reply.

          Undoubtedly I don't, but this raises the question: What is the expected user experience here? This is the default installation directory, so it seems that it would always present the same problem.

          And there's still the question of why Creator doesn't see the examples...

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Stokestack said in Qt Creator does not see examples; also can't build them, because of permissions.:

          And there's still the question of why Creator doesn't see the examples...

          Qt Creator needs to be told where to find your compiler and your Qt version(s).

          If you use the official installer, the installer sets this up for you. If you build from source, you set it up manually:

          • Add Qt version
          • Add compiler
          • Add kit

          (Simplistically, a "Kit" is a Qt version + a compiler)

          What is the expected user experience here? This is the default installation directory, so it seems that it would always present the same problem.

          I'm not familiar with the macOS way of doing things, so I'll let someone else comment on the expected user experience for macOS.

          On Windows, if I build Qt from source, I install it to a folder where I have full permissions (like C:\Qt\) and everything works fine.

          But anyway, I prefer to use the official installer which takes care of most of the initial setup for me.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          StokestackS 1 Reply Last reply
          1
          • JKSHJ JKSH

            @Stokestack said in Qt Creator does not see examples; also can't build them, because of permissions.:

            And there's still the question of why Creator doesn't see the examples...

            Qt Creator needs to be told where to find your compiler and your Qt version(s).

            If you use the official installer, the installer sets this up for you. If you build from source, you set it up manually:

            • Add Qt version
            • Add compiler
            • Add kit

            (Simplistically, a "Kit" is a Qt version + a compiler)

            What is the expected user experience here? This is the default installation directory, so it seems that it would always present the same problem.

            I'm not familiar with the macOS way of doing things, so I'll let someone else comment on the expected user experience for macOS.

            On Windows, if I build Qt from source, I install it to a folder where I have full permissions (like C:\Qt\) and everything works fine.

            But anyway, I prefer to use the official installer which takes care of most of the initial setup for me.

            StokestackS Offline
            StokestackS Offline
            Stokestack
            wrote on last edited by
            #5

            @JKSH Thanks for the reply.

            The "official" installer is gone, per the Qt "company" for 5.15 and for the future. It's a nice FU to the open-source community.

            The Qt version is already linked up. The doc is wrong, but I filed a bug and that has been addressed for an upcoming release.

            I don't know what adding compilers and kits has to do with Qt Creator not seeing examples.

            J.HilkJ JKSHJ 2 Replies Last reply
            0
            • StokestackS Stokestack

              @JKSH Thanks for the reply.

              The "official" installer is gone, per the Qt "company" for 5.15 and for the future. It's a nice FU to the open-source community.

              The Qt version is already linked up. The doc is wrong, but I filed a bug and that has been addressed for an upcoming release.

              I don't know what adding compilers and kits has to do with Qt Creator not seeing examples.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by J.Hilk
              #6

              @Stokestack said in Qt Creator does not see examples; also can't build them, because of permissions.:

              The "official" installer is gone, per the Qt "company" for 5.15 and for the future. It's a nice FU to the open-source community.

              The offline installer yes, the online one should be still there for everyone!


              Just checked, in case the QtC pulled one over us
              Link
              5ab1b10c-a234-43f0-b224-e2cc024a9be3-image.png


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              StokestackS 1 Reply Last reply
              0
              • J.HilkJ J.Hilk

                @Stokestack said in Qt Creator does not see examples; also can't build them, because of permissions.:

                The "official" installer is gone, per the Qt "company" for 5.15 and for the future. It's a nice FU to the open-source community.

                The offline installer yes, the online one should be still there for everyone!


                Just checked, in case the QtC pulled one over us
                Link
                5ab1b10c-a234-43f0-b224-e2cc024a9be3-image.png

                StokestackS Offline
                StokestackS Offline
                Stokestack
                wrote on last edited by Stokestack
                #7

                @J-Hilk Yes, so any offline systems are screwed unless they build from source. That's why we need to get all the bugs ironed out with this process.

                J.HilkJ 1 Reply Last reply
                0
                • StokestackS Stokestack

                  @J-Hilk Yes, so any offline systems are screwed unless they build from source. That's why we need to get all the bugs ironed out with this process.

                  J.HilkJ Offline
                  J.HilkJ Offline
                  J.Hilk
                  Moderators
                  wrote on last edited by J.Hilk
                  #8

                  @Stokestack Use the online installer, copy paste the the folder to your offline system.

                  Same way you deploy a Qt App.

                  I'm not saying I like the new system, I'm saying you're not required to compile from source to use Qt/QtCreator even as a non commercial user!

                  And if you want to contribute to the community and stick it to the QtC make an offline installer yourself and publish it for free on the new Qtmarketplace ! 😉🤓


                  Edit: I have no idea if you can publish executables on the marketplace 🤔 Haven't used it yet myself


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  StokestackS 1 Reply Last reply
                  2
                  • StokestackS Stokestack

                    @JKSH Thanks for the reply.

                    The "official" installer is gone, per the Qt "company" for 5.15 and for the future. It's a nice FU to the open-source community.

                    The Qt version is already linked up. The doc is wrong, but I filed a bug and that has been addressed for an upcoming release.

                    I don't know what adding compilers and kits has to do with Qt Creator not seeing examples.

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by JKSH
                    #9

                    @Stokestack said in Qt Creator does not see examples; also can't build them, because of permissions.:

                    I don't know what adding compilers and kits has to do with Qt Creator not seeing examples.

                    See https://wiki.qt.io/Qt_Examples_in_Qt_Creator#Examples_from_registered_Qt_Versions

                    Qt Creator queries the Qt versions that you add in order to find documentation and examples. When it knows where to find your Qt version, it calls qmake -query QT_INSTALL_DOCS to find the doc folder and then reads example-manifest.xml to find the examples.

                    If you want to dig deeper, you can call qmake -query QT_INSTALL_DOCS yourself to see where it leads. Also, you can set the QTC_DEBUG_EXAMPLESMODEL environment variable to a non-zero value as described by the wiki and then run Qt Creator from the command line to see the debug output.

                    Technically, Qt Creator only needs Qt versions to find examples but it doesn't need compilers and kits. However, having Qt/compiler/kit missing is a common problem so I listed it here. I did not know that you had already added your Qt version.

                    The doc is wrong, but I filed a bug and that has been addressed for an upcoming release.

                    What was the bug? Could you please link the bug report here?

                    Perhaps the doc error was blocking Qt Creator from finding the examples.

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    StokestackS 1 Reply Last reply
                    4
                    • JKSHJ JKSH

                      @Stokestack said in Qt Creator does not see examples; also can't build them, because of permissions.:

                      I don't know what adding compilers and kits has to do with Qt Creator not seeing examples.

                      See https://wiki.qt.io/Qt_Examples_in_Qt_Creator#Examples_from_registered_Qt_Versions

                      Qt Creator queries the Qt versions that you add in order to find documentation and examples. When it knows where to find your Qt version, it calls qmake -query QT_INSTALL_DOCS to find the doc folder and then reads example-manifest.xml to find the examples.

                      If you want to dig deeper, you can call qmake -query QT_INSTALL_DOCS yourself to see where it leads. Also, you can set the QTC_DEBUG_EXAMPLESMODEL environment variable to a non-zero value as described by the wiki and then run Qt Creator from the command line to see the debug output.

                      Technically, Qt Creator only needs Qt versions to find examples but it doesn't need compilers and kits. However, having Qt/compiler/kit missing is a common problem so I listed it here. I did not know that you had already added your Qt version.

                      The doc is wrong, but I filed a bug and that has been addressed for an upcoming release.

                      What was the bug? Could you please link the bug report here?

                      Perhaps the doc error was blocking Qt Creator from finding the examples.

                      StokestackS Offline
                      StokestackS Offline
                      Stokestack
                      wrote on last edited by Stokestack
                      #10

                      @JKSH Great, thanks for taking the time to provide all that info. That qmake query returns:

                      /usr/local/Qt-5.15.0/doc

                      So that seems OK. But I don't find either of those manifest files anywhere below that. The only file whose name contains "manifest" is manifest-meta.qdocconf, which has some examples listed but doesn't seem complete. But this is perplexing:

                      qmake -query QT_INSTALL_EXAMPLES

                      returns

                      /usr/local/Qt-5.15.0/examples

                      Which is correct. Setting QTC_DEBUG_EXAMPLESMODEL and launching from the command line yields:

                      Reading Help/InstalledExamples from settings: ()
                      "Reading file ":/qtsupport/qtcreator_tutorials.xml"..."
                      "Reading file ":/qtsupport/qtcreator_tutorials.xml"..."

                      The bug report is here: https://bugreports.qt.io/browse/QTCREATORBUG-24138

                      The problem was in the verbiage of the doc, not in the functionality of the doc system.

                      1 Reply Last reply
                      0
                      • J.HilkJ J.Hilk

                        @Stokestack Use the online installer, copy paste the the folder to your offline system.

                        Same way you deploy a Qt App.

                        I'm not saying I like the new system, I'm saying you're not required to compile from source to use Qt/QtCreator even as a non commercial user!

                        And if you want to contribute to the community and stick it to the QtC make an offline installer yourself and publish it for free on the new Qtmarketplace ! 😉🤓


                        Edit: I have no idea if you can publish executables on the marketplace 🤔 Haven't used it yet myself

                        StokestackS Offline
                        StokestackS Offline
                        Stokestack
                        wrote on last edited by
                        #11

                        @J-Hilk said in Qt Creator does not see examples; also can't build them, because of permissions.:

                        And if you want to contribute to the community and stick it to the QtC make an offline installer yourself and publish it for free on the new Qtmarketplace ! 😉🤓

                        Exactly what I'm considering! Unfortunately/fortunately I still have regular job, though...

                        aha_1980A 1 Reply Last reply
                        2
                        • StokestackS Stokestack

                          @J-Hilk said in Qt Creator does not see examples; also can't build them, because of permissions.:

                          And if you want to contribute to the community and stick it to the QtC make an offline installer yourself and publish it for free on the new Qtmarketplace ! 😉🤓

                          Exactly what I'm considering! Unfortunately/fortunately I still have regular job, though...

                          aha_1980A Offline
                          aha_1980A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @Stokestack

                          Exactly what I'm considering! Unfortunately/fortunately I still have regular job, though...

                          That applies to nearly everyone here ;)

                          Having an "unofficial" offline installer would be nice. So far I used @J-Hilk's trick with copying after online installer once and it worked fine.

                          Regards

                          Qt has to stay free or it will die.

                          StokestackS 1 Reply Last reply
                          3
                          • aha_1980A aha_1980

                            @Stokestack

                            Exactly what I'm considering! Unfortunately/fortunately I still have regular job, though...

                            That applies to nearly everyone here ;)

                            Having an "unofficial" offline installer would be nice. So far I used @J-Hilk's trick with copying after online installer once and it worked fine.

                            Regards

                            StokestackS Offline
                            StokestackS Offline
                            Stokestack
                            wrote on last edited by
                            #13

                            @aha_1980 said in Qt Creator does not see examples; also can't build them, because of permissions.:

                            Having an "unofficial" offline installer would be nice. So far I used @J-Hilk's trick with copying after online installer once and it worked fine.

                            Good to know. What were the loose ends you had to tidy up manually after copying the whole thing?

                            aha_1980A 1 Reply Last reply
                            0
                            • StokestackS Stokestack

                              @aha_1980 said in Qt Creator does not see examples; also can't build them, because of permissions.:

                              Having an "unofficial" offline installer would be nice. So far I used @J-Hilk's trick with copying after online installer once and it worked fine.

                              Good to know. What were the loose ends you had to tidy up manually after copying the whole thing?

                              aha_1980A Offline
                              aha_1980A Offline
                              aha_1980
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              Hi @Stokestack,

                              What were the loose ends you had to tidy up manually after copying the whole thing?

                              At least for the Creator directory I didn't do anything special after copying, it just worked. I have not copied a whole Qt installation yet, but I assume that will work too if you use the exact same folder names.

                              Regards

                              Qt has to stay free or it will die.

                              StokestackS 1 Reply Last reply
                              0
                              • aha_1980A aha_1980

                                Hi @Stokestack,

                                What were the loose ends you had to tidy up manually after copying the whole thing?

                                At least for the Creator directory I didn't do anything special after copying, it just worked. I have not copied a whole Qt installation yet, but I assume that will work too if you use the exact same folder names.

                                Regards

                                StokestackS Offline
                                StokestackS Offline
                                Stokestack
                                wrote on last edited by
                                #15

                                @aha_1980 Ah, OK. I thought you had copied all of Qt. I assume there'll be some paths to set and whatnot.

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