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. How to download examples
Forum Updated to NodeBB v4.3 + New Features

How to download examples

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 5 Posters 9.2k 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.
  • U Offline
    U Offline
    Uberlinc
    wrote on last edited by
    #1

    Hi,

    So, I'm trying to teach myself and and I'm wanting to download some of the examples:
    https://doc.qt.io/qt-5/all-examples.html

    I found the source code and tried creating a standard Qt Widgets application, then dropping the code into newly-created files of the same name.
    Unfortunately, when I tried to run the code, the error panel lit up like a Christmas tree and the list of errors was longer than my arm.
    A little difficult to debug/fix code that I'm still only learning myself!

    So, instead of copying the text into files, is there a way to simply bulk download the whole project, such that it should self-contained and able to be run cleanly without too much drama?

    Thanks.

    JKSHJ 1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Either they're installed with Qt Crator and the Qt installer or your can download them from https://code.qt.io/cgit/qt/qtbase.git/tree/examples/ - the link is at the bottom on every example page.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • U Offline
        U Offline
        Uberlinc
        wrote on last edited by
        #3

        Can you be more specific about what the link looks like?

        If I click on the file itself, I get the code displayed.
        If I right-click on the file, it wants to save as an HTML file.
        I see no button/link on any of these pages that would indicate that clicking would download the project and files.

        Thanks.

        Christian EhrlicherC 1 Reply Last reply
        0
        • U Uberlinc

          Can you be more specific about what the link looks like?

          If I click on the file itself, I get the code displayed.
          If I right-click on the file, it wants to save as an HTML file.
          I see no button/link on any of these pages that would indicate that clicking would download the project and files.

          Thanks.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Either use git to download the whole qt repo or click on the 'plain' link on every file.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          2
          • U Offline
            U Offline
            Uberlinc
            wrote on last edited by
            #5

            Thanks.
            You'll have to forgive me as I am a noob at this, but what do you mean by "... use git"?

            VRoninV 1 Reply Last reply
            0
            • U Uberlinc

              Hi,

              So, I'm trying to teach myself and and I'm wanting to download some of the examples:
              https://doc.qt.io/qt-5/all-examples.html

              I found the source code and tried creating a standard Qt Widgets application, then dropping the code into newly-created files of the same name.
              Unfortunately, when I tried to run the code, the error panel lit up like a Christmas tree and the list of errors was longer than my arm.
              A little difficult to debug/fix code that I'm still only learning myself!

              So, instead of copying the text into files, is there a way to simply bulk download the whole project, such that it should self-contained and able to be run cleanly without too much drama?

              Thanks.

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

              @Uberlinc said in How to download examples:

              So, I'm trying to teach myself and and I'm wanting to download some of the examples

              Rather than download examples from the Internet, it is much easier to search for the examples in the Qt Creator IDE instead.

              what do you mean by "... use git"?

              Again, if you use Qt Creator then you don't need to worry about this.

              But anyway, git is an important tool for software developers. Learn it in your spare time (remember this is completely separate from the Qt examples): https://git-scm.com/

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

              U 1 Reply Last reply
              4
              • U Uberlinc

                Thanks.
                You'll have to forgive me as I am a noob at this, but what do you mean by "... use git"?

                VRoninV Offline
                VRoninV Offline
                VRonin
                wrote on last edited by
                #7

                @Uberlinc said in How to download examples:

                what do you mean by "... use git"?

                Git is a version control manager (it was created by the same guy that created Linux to keep the Linux code in order), you can download it here: https://git-scm.com/ but it's not that newcomers friendly on its own so i suggest you use an interface client.
                IMHO the best is https://gitextensions.github.io/ but, if you are not on windows, you might prefer something like https://www.gitkraken.com/

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                1 Reply Last reply
                4
                • JKSHJ JKSH

                  @Uberlinc said in How to download examples:

                  So, I'm trying to teach myself and and I'm wanting to download some of the examples

                  Rather than download examples from the Internet, it is much easier to search for the examples in the Qt Creator IDE instead.

                  what do you mean by "... use git"?

                  Again, if you use Qt Creator then you don't need to worry about this.

                  But anyway, git is an important tool for software developers. Learn it in your spare time (remember this is completely separate from the Qt examples): https://git-scm.com/

                  U Offline
                  U Offline
                  Uberlinc
                  wrote on last edited by
                  #8

                  @JKSH said in How to download examples:

                  Again, if you use Qt Creator then you don't need to worry about this.

                  I am actually using Qt-Creator on Xubuntu.
                  As part of the install, I tried to run an apt install of something that looks like examples but it appears to have failed.

                  Are there examples within the actual Qt Creator?
                  If so, how does one access them?

                  Thanks.

                  JKSHJ 1 Reply Last reply
                  0
                  • U Uberlinc

                    @JKSH said in How to download examples:

                    Again, if you use Qt Creator then you don't need to worry about this.

                    I am actually using Qt-Creator on Xubuntu.
                    As part of the install, I tried to run an apt install of something that looks like examples but it appears to have failed.

                    Are there examples within the actual Qt Creator?
                    If so, how does one access them?

                    Thanks.

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

                    @Uberlinc said in How to download examples:

                    Are there examples within the actual Qt Creator?
                    If so, how does one access them?

                    Yes. https://doc.qt.io/qtcreator/creator-build-example-application.html

                    I am actually using Qt-Creator on Xubuntu.
                    As part of the install, I tried to run an apt install of something that looks like examples but it appears to have failed.

                    You need to do one of the following:

                    • Work out why it failed and fix it, so that you can install the examples from apt. OR
                    • Install Qt and Qt Creator from the official installer: https://www.qt.io/download-open-source

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

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      starkm42
                      wrote on last edited by
                      #10

                      anyone still having trouble downloading examples, can find it here:
                      https://code.qt.io/cgit/qt/qtbase.git/

                      bottom left you will find.
                      git://code.qt.io/qt/qtbase.git
                      http://code.qt.io/qt/qtbase.git
                      https://code.qt.io/qt/qtbase.git

                      use git client to download.

                      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