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
QtWS25 Last Chance

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 last edited by
    #1

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

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on 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
      1
      • mrjjM mrjj

        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 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.

        mrjjM 1 Reply Last reply
        0
        • S Sai Raul

          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.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on 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
          0
          • mrjjM mrjj

            @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 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.

            mrjjM 1 Reply Last reply
            0
            • S Sai Raul

              @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.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on 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
              1
              • mrjjM mrjj

                @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 last edited by
                #7

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

                mrjjM 1 Reply Last reply
                0
                • S Sai Raul

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

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Sai-Raul

                  ok.
                  but Qlabels only likes pixmaps.

                  1 Reply Last reply
                  1

                  • Login

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