Solved Create QWidget at very top of window in main layout?
-
I'm trying to create a custom titlebar in a Frameless window. I want to add this title bar (which is a QWidget) to the very top of the window, as high as possible. When I add it as first in the QVBoxLayout which is my main layout, however, there is an annoying space between it and the top. I set a fixed height for my title bar widget, but I'm not sure where to go from here. How can I remove the automatic spacing between the top of the window and the first widget in the window's QVBoxLayout?
-
@evankirkiles I guess you need to reduce spacing: http://doc.qt.io/qt-5/qlayout.html#spacing-prop
-
@jsulm Found out about content margins after digging around your recommendation for a little bit. Thank you very much! :)