[Interest] widget rendering (alignment, sizing) issues on OS X

Adam Light aclight at gmail.com
Tue May 31 00:22:50 CEST 2016


On Mon, May 30, 2016 at 12:39 AM, René J. V. <rjvbertin at gmail.com> wrote:

> René J.V. Bertin wrote:
>
> Hi,
>
> >
> >> In our application, we have the following code in a
> >> QApplication::eventFilter reimplementation for this exact reason:
> >>
> >> case QEvent::ChildAdded:
> > ...
> >> theChildWidget->setAttribute(Qt::WA_LayoutUsesWidgetRect, true);
> >
> > That's very interesting, I hadn't yet realised there was a way to do
> this for
> > every widget created.
>
> I tried this, putting the event filter in my platform theme plugin where it
> affects each and every widget in each and every application when that
> plugin is
> set to load at startup :)
>
> Doesn't help. In fact, it makes interfaces even more "bloated" than they
> are,
> with even more space among widgets than is already being (IMHO) wasted.
> I'm not
> really sure if that's something that shows up in particular in applications
> using KF5 features for their interface but the result is that they look as
> if
> designed for the visually or motor impaired.
> (Or to use an analogy: KDE's new default style is called Breeze to suggest
> a
> fresh new wind ... the native Mac style could be called Draughty in that
> mindset
> :))
>

To address this in our application, we use a QProxyStyle subclass in which
we reimplement layoutSpacing on Macintosh like so:

		if (spacing > 2) {

			spacing /= 2;

		}


Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160530/8c9b09a3/attachment.html>


More information about the Interest mailing list