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. How resize a QDockWidget with transulant background
Qt 6.11 is out! See what's new in the release blog

How resize a QDockWidget with transulant background

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 585 Views 1 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.
  • Roy44R Offline
    Roy44R Offline
    Roy44
    wrote on last edited by
    #1

    Hi,

    I made a custom QDockwidget and I set attribute Qt::WA_TranslucentBackground for a nice rendering.
    0_1519746359006_mydockwidget.jpg
    Of course with Qt::WA_TranslucentBackground I haven't access to some QDockwidget grip (for resizing).
    I can't resize (with the mouse) my dockwidget even If I try to grip on titlebar.
    Is it possible to resize my dockwidget with Qt::WA_TranslucentBackground attributes ?
    If yes how ?

    thanks.
    Sorry for my horrible english.

    A 1 Reply Last reply
    0
    • Roy44R Roy44

      Hi,

      I made a custom QDockwidget and I set attribute Qt::WA_TranslucentBackground for a nice rendering.
      0_1519746359006_mydockwidget.jpg
      Of course with Qt::WA_TranslucentBackground I haven't access to some QDockwidget grip (for resizing).
      I can't resize (with the mouse) my dockwidget even If I try to grip on titlebar.
      Is it possible to resize my dockwidget with Qt::WA_TranslucentBackground attributes ?
      If yes how ?

      thanks.
      Sorry for my horrible english.

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @Roy44 You could:

      1. Add a grip widget to handle resizing
      2. Resize programatically via a button click for exapnding/shrinking the widget (using resize()).
      3. Write your own resizing since you wrote your own widget anyway.. This would basically mean handling mouse events and finding when the mouse is in your invisible "resize" zone then changing the mouse cursor, capturing the click and drag, doing the resize, then changing cursor back on release.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      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