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. QLabel image load
Forum Update on Monday, May 27th 2025

QLabel image load

Scheduled Pinned Locked Moved Unsolved General and Desktop
qlabelshow imagesc++qscrollarea
8 Posts 2 Posters 1.2k Views
  • 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.
  • S Offline
    S Offline
    Sai Raul
    wrote on 21 Oct 2021, 04:13 last edited by
    #1

    How to show more number(folder) of images in Qlabel or QScrollArea?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 21 Oct 2021, 05:39 last edited by
      #2

      Hi
      Do you want to show folders also ?

      In any case, QLabel is not good for mutiple images.

      You could use QTableWidget in icon mode if its fine all picture be shown in same size.

      alt text

      S 1 Reply Last reply 21 Oct 2021, 05:56
      1
      • M mrjj
        21 Oct 2021, 05:39

        Hi
        Do you want to show folders also ?

        In any case, QLabel is not good for mutiple images.

        You could use QTableWidget in icon mode if its fine all picture be shown in same size.

        alt text

        S Offline
        S Offline
        Sai Raul
        wrote on 21 Oct 2021, 05:56 last edited by
        #3

        Hai @mrjj thank you for the response

        Noo i want do that, And when im scroll my scroll bar automatically change image in same Qlabel.

        M 1 Reply Last reply 21 Oct 2021, 05:59
        0
        • S Sai Raul
          21 Oct 2021, 05:56

          Hai @mrjj thank you for the response

          Noo i want do that, And when im scroll my scroll bar automatically change image in same Qlabel.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 21 Oct 2021, 05:59 last edited by
          #4

          @Sai-Raul

          Hi

          • Noo i want do that,
            Is that No thx to ListWidget or Yes to it ?

          If you show multiple images at the same time, and then scroll.
          What image do you mean you want to show in some QLabel ?

          S 1 Reply Last reply 21 Oct 2021, 06:07
          0
          • M mrjj
            21 Oct 2021, 05:59

            @Sai-Raul

            Hi

            • Noo i want do that,
              Is that No thx to ListWidget or Yes to it ?

            If you show multiple images at the same time, and then scroll.
            What image do you mean you want to show in some QLabel ?

            S Offline
            S Offline
            Sai Raul
            wrote on 21 Oct 2021, 06:07 last edited by
            #5

            @mrjj Noo i mean i want to do that in Qlabel only,
            I have some images in one folder and i want to show that all images in Qlabel and scroll that.

            M 1 Reply Last reply 21 Oct 2021, 06:11
            0
            • S Sai Raul
              21 Oct 2021, 06:07

              @mrjj Noo i mean i want to do that in Qlabel only,
              I have some images in one folder and i want to show that all images in Qlabel and scroll that.

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 21 Oct 2021, 06:11 last edited by
              #6

              @Sai-Raul

              Hi
              Ok.
              Well if you want to show ALL image in ONE label, you need to combine them to one big fat image.
              QLabel Only accepts one pixmap.
              Else you need multiple labels - one pr image and add them to the scroll area and it can then be scrolled.

              Or do you mean like the ones we see on the net, where ONE image is shown
              and then you can press < or > to see next picture ?

              S 1 Reply Last reply 21 Oct 2021, 06:29
              1
              • M mrjj
                21 Oct 2021, 06:11

                @Sai-Raul

                Hi
                Ok.
                Well if you want to show ALL image in ONE label, you need to combine them to one big fat image.
                QLabel Only accepts one pixmap.
                Else you need multiple labels - one pr image and add them to the scroll area and it can then be scrolled.

                Or do you mean like the ones we see on the net, where ONE image is shown
                and then you can press < or > to see next picture ?

                S Offline
                S Offline
                Sai Raul
                wrote on 21 Oct 2021, 06:29 last edited by
                #7

                @mrjj Here we don't use in Qpixmap, We can do that by using QFileInfo and filePath(), absoluteFilePath(), and dir().

                M 1 Reply Last reply 21 Oct 2021, 07:54
                0
                • S Sai Raul
                  21 Oct 2021, 06:29

                  @mrjj Here we don't use in Qpixmap, We can do that by using QFileInfo and filePath(), absoluteFilePath(), and dir().

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 21 Oct 2021, 07:54 last edited by
                  #8

                  @Sai-Raul

                  ok.
                  but Qlabels only likes pixmaps.

                  1 Reply Last reply
                  1

                  7/8

                  21 Oct 2021, 06:29

                  • Login

                  • Login or register to search.
                  7 out of 8
                  • First post
                    7/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved