[Interest] Suppress titlebar of dock widget?

Matthew Woehlke mwoehlke.floss at gmail.com
Tue Sep 8 21:01:02 CEST 2020


On 08/09/2020 14.46, Matthew Woehlke wrote:
> I have a dock widget that cannot be moved, closed or floated 
> (essentially, I need something that takes up the dock corner 
> preferentially), but I want it to *not* have a titlebar. Is there a way 
> to accomplish this?
> 
> Note: I am also implementing my own QStyle. My initial idea was to tweak 
> the QStyle to detect this widget and fiddle with the size/metrics (I 
> don't need exactly zero pixels; if I can make the titlebar 1-2 pixels 
> tall, that is good enough), but my attempt to make the titlebar 
> smaller/hidden that way is not working... However, I'm not sure if I 
> know what to change. So far I have fiddles with the pixel metrics and 
> subcontrol rects, but I don't see anything else I can affect? It seems 
> like there must be a way to control this, as I'm pretty sure I've seen 
> styles with different sized titlebars!

Sigh. Should've checked SO: 
https://stackoverflow.com/questions/18918496. Apparently, the answer is 
'replace the titlebar widget'.

...but I'm still curious why I can't get fiddling with the style to have 
any effect?

-- 
Matthew


More information about the Interest mailing list