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. [PYTHON 3.8] How to set image background like this in Qt?
Qt 6.11 is out! See what's new in the release blog

[PYTHON 3.8] How to set image background like this in Qt?

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

    Background image example how I want it to look

    Example: alt text

    How I have: alt text
    I use QLabel with pixmap where image is chosen from Resource.qrc file.

    1 Reply Last reply
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by gde23
      #2
      • take the QLabel with the pixmap, that you already have.
      • create a new Layout
      • set the layout to the label myLabel->setLayout(myLayout);
      • add all the other widgets you want, Labels, EditBoxes... to that layout
      1 Reply Last reply
      0
      • J Offline
        J Offline
        JustPassingBy
        wrote on last edited by
        #3

        Setting label picture to formLayout didn't work out for me or I'm doing something wrong?

        self.amdlabel = self.window.findChild(QLabel, "labelAMD")
        self.formlayout = self.window.findChild(QFormLayout, "formLayout")
        self.amdlabel.setLayout(self.formlayout)
        

        labelAMD = alt text
        formLayout = alt text

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JustPassingBy
          wrote on last edited by
          #4

          Solved.
          Right-click the label and click the "send-to-back" option.

          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