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. [Solved] If an image has more height than the label, how can the label be scrollable so the user can view all the image?
Qt 6.11 is out! See what's new in the release blog

[Solved] If an image has more height than the label, how can the label be scrollable so the user can view all the image?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.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.
  • L Offline
    L Offline
    Leon
    wrote on last edited by
    #1

    I don't know if label is the correct widget for this..

    So for example.. I have this image:

    !http://i.imgur.com/ZDvBR.png(image)!

    if i set the pixmap of the label to this image, but the label height is less than the image height ( note: i have set at label aligment ->vertical->aligntop ) this will be shown in the window :

    !http://i.imgur.com/mt5nf.png(image2)!

    What can i do so the image to be scrollable so as the user can scroll and view the rest of the image? I think you can understant what i want to say...
    Thanks for any answer, Leon!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      How about you put the label inside a [[doc:QScrollArea]]?

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Leon
        wrote on last edited by
        #3

        Thanks Andre! Works ;)

        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