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

Access Border

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

    Hello, i am trying to build an mp3 player using pyqt.
    I have a couple of QHBoxLayouts and QVBoxLayouts inside of a QWidget. (The outer most widget is a QWidget so that I can set a stylesheet and change the background color). I tried to have the top and the bottom frame in a different color. This all worked out, but as you can see in the picture, there is a border around my pink topframe and my red bottomframe. I am now wondering why this border is there and how i can access or even better remove it.alt text

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      Assuming that a QVboxLayout contains the top and bottom frame you want to look at QLayout::setSpacing()

      1 Reply Last reply
      1
      • Z Offline
        Z Offline
        Zwenn
        wrote on last edited by
        #3

        Yes, you are completely right my QVBoxLayout that holds them is called MainLayout. But calling self.MainLayout.setSpacing(0) doesn't do anything. I am not sure if I understood the documentary correctly though, this might not be the right way to call this method. Anyways, i got it to work with the .setContentsMargin(0,0,0,0) method, for anyone who might have the same issue. Thanks a lot for the quick help!

        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