Closed adigitoleo closed 3 years ago
Using the group_box.enaml example I cannot reproduce on either PyQt5 or PySide2. Not that the implementation you truly care about is on the proxy under the enaml.qt package.
Can you test the example and if it works there ? if it does please share your script so that I can see if there is anything wrong with it.
Hmm it seems it's related to the Qt style. With the default style (empty QT_STYLE_OVERRIDE) on my machine (Arch Linux) the "flat" checkbox in the example doesn't remove the border.
However, with e.g. kvantum-dark
style it works.
Edit: the default style seems to be fusion
.
I just ran the example with both PyQt5 and PySide2 and the outcome is the same. Presumably this is an upstream thing in the fusion style.
A very quick browse of the upstream tracker didn't reveal anything yet, I might submit something if I get time to reproduce it on a pure Qt example. This seems to affect both isFlat
and setFlat
methods of the underlying widget, and appears to be restricted to fusion
style.
The workaround for me right now is to use a VGroup with a centered Label above the ScrollArea instead.
The GroupBox Qt implementation does mention that some style may ignore flat or that the differences between flat and non flat version may be minimal. I must say I tested on windows so that may be why I did not see the issue.
Yep, using the windows
style it is working as expected, so that's another possible workaround for me. Thanks, I'll close this since it's not an enaml issue.
I have a ScrollArea inside the GroupBox, and each draw their own border. In the docs I read that
flat=True
disables most of the GroupBox border, but the setting had no effect (enaml 0.12.0, QtPy 1.9.0, PySide2 5.15.2). I checked the source and theset_flat
method of the proxy object is not implemented, and I couldn't findflat
in container.pyShould it work? Or maybe there are better options for having a ScrollArea with a centered title above it?
Cheers