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. QDockWidget - setting margins
QtWS25 Last Chance

QDockWidget - setting margins

Scheduled Pinned Locked Moved Unsolved General and Desktop
qdockwidgetmargins
1 Posts 1 Posters 1.2k 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.
  • 6 Offline
    6 Offline
    6ort
    wrote on last edited by
    #1

    Hi, I have an issue with margins on a dock widget.

    As per the documentation I have put a QDockWidget to the window with addDockWidget();. The problem is, it goes all the way to the borders of the program. I am not sure how to apply margins here. If I apply margins to the content widget, then it looks bad when floated (there is a margin around the background-color of the content-widget).

    Is there a way to apply margins to the whole DockWidget or the DockWidgetArea ? (see pic of how it looks now: http://i67.tinypic.com/25kk76e.jpg - how can I make the dock on the left as a whole be 8 px from the edges like the rest of the UI?

    I tried to use the isFloating bool to apply different stylesheets but that only works for the QDockWidget, and putting a margin on the dock widget itself does nothing.

    Any help? Thank you

    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