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. Paint a QPixmap unto a QFrame?

Paint a QPixmap unto a QFrame?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 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.
  • PadawanP Offline
    PadawanP Offline
    Padawan
    wrote on last edited by
    #1

    Is it possible for me to paint an image unto a QFrame, i know there are other easy alternatives but just imagine that you had no other choice, how would you paint a QPixmap which has an image unto a QFrame, also is there perhaps another widget that would be suitable for displaying video output and also has the ability to easily show a image because i'm using the QFrame for video output and it works fine but i also need it to show an image

    Ningen

    1 Reply Last reply
    0
    • PadawanP Padawan

      I could use styleSheets to set a background image on the QFrame but that requires an actual image file on the computer right? the image that i want to show on the QFrame is extracted from the metadata of a music file. Is there a way for background-image in stylesheets to accept a QPixmap obj rather than a resource file?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #3

      @Padawan

      Just use a QLabel and its setPixmap function.

      • https://doc.qt.io/qt-5/qlabel.html#pixmap-prop

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      2
      • PadawanP Offline
        PadawanP Offline
        Padawan
        wrote on last edited by
        #2

        I could use styleSheets to set a background image on the QFrame but that requires an actual image file on the computer right? the image that i want to show on the QFrame is extracted from the metadata of a music file. Is there a way for background-image in stylesheets to accept a QPixmap obj rather than a resource file?

        Ningen

        Pl45m4P 1 Reply Last reply
        0
        • PadawanP Padawan

          I could use styleSheets to set a background image on the QFrame but that requires an actual image file on the computer right? the image that i want to show on the QFrame is extracted from the metadata of a music file. Is there a way for background-image in stylesheets to accept a QPixmap obj rather than a resource file?

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #3

          @Padawan

          Just use a QLabel and its setPixmap function.

          • https://doc.qt.io/qt-5/qlabel.html#pixmap-prop

          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          2
          • PadawanP Offline
            PadawanP Offline
            Padawan
            wrote on last edited by
            #4

            i ended up just adding a QLabel to the QFrame Layout whenever i want to display an image, and when i want to display a video, it switches to a QVideoWidget object

            Ningen

            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