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. QGroupBox: sunken frame problem
QtWS25 Last Chance

QGroupBox: sunken frame problem

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

    Hello,

    I'm trying to make a QGroupBox have a deeper, sunken frame without success. SetFrameStyle seems unavailable in 4.7 and setStyleSheet("border-style: inset;") makes the QGroupBox disappear, even if it's background color is different from the mainWindow.

    So, is there another way?

    Thanks.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sigrid
      wrote on last edited by
      #2

      In order for the border to show up, try giving it a value for the width as shown below. Does that help?

      @box->setStyleSheet(" QGroupBox { border-style: inset; border: 1px solid black;}");@

      Also, perhaps using QFrame instead of QGroupBox makes it easier to achieve what you want?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        babazaroni
        wrote on last edited by
        #3

        Thanks for the QFrame suggestion. QFrame allows me to use the setFrameStyle and setLineWidth. This makes the frame deeper.

        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