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. Picture Not Showing
Qt 6.11 is out! See what's new in the release blog

Picture Not Showing

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.3k 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.
  • H Offline
    H Offline
    heedaf
    wrote on last edited by
    #1

    I'm using a label in Qt Designer to display a picture to show up on the display. It shows up on the Designer page but it won't show up on my RPI after I build it. Everything else comes over find - clocks, calendar, etc.. Does anyone have an idea what the problem might be?

    M 1 Reply Last reply
    0
    • H heedaf

      I'm using a label in Qt Designer to display a picture to show up on the display. It shows up on the Designer page but it won't show up on my RPI after I build it. Everything else comes over find - clocks, calendar, etc.. Does anyone have an idea what the problem might be?

      M Offline
      M Offline
      maximus
      wrote on last edited by
      #2

      @heedaf

      Hi there,
      Can you post the code you use in designer to show the image in the QLabel?
      If you use stylesheet to display the image in the QLabel, it's possible you modified the stylesheet in the code later?

      If you set the picture in code, you can use something like that :
      Good luck!

      QByteArray data_pixmap;
      QPixmap pixmap;
      pixmap.loadFromData(data_pixmap);
      labelIcon->setPixmap(pixmap);
      

      Free Indoor Cycling Software - https://maximumtrainer.com

      1 Reply Last reply
      0
      • H Offline
        H Offline
        heedaf
        wrote on last edited by
        #3

        I load it directly using the pixmap selection under QLabel on the property editor. The picture shows up in Qt Designer but doesn't show on the forum when compiled - very strange.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          can you show your code?

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          H 1 Reply Last reply
          0
          • M mcosta

            Hi and welcome to devnet,

            can you show your code?

            H Offline
            H Offline
            heedaf
            wrote on last edited by heedaf
            #5

            Thank you!

            I'm not using code just Qt Designer to try and load the image.

            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