[Interest] Creating fat binaries for Qt6 on macOS

Sze Howe Koh szehowe.koh at gmail.com
Wed Apr 13 15:52:39 CEST 2022


On Wed, 13 Apr 2022 at 07:34, Dirk Hohndel <dirk at hohndel.org> wrote:
> > > So... hear me out here... if Qt can switch to OpenGL... and if this thingy
> > > doesn't work unless it's OpenGL... shouldn't Qt simply switch to OpenGL?
> > > Or is this too radically useful?
> > >
> >
> > My guess is that it has to be explicit on your side because Metal has some
> > advantage that OpenGL doesn't. I wouldn't know what, since it's not an area I
> > pay attention to.
> >
>
> :-)
>
> So instead of defaulting to something that works, Qt defaults to something that
> may have some vague advantage that you aren't certain about.
>
> Solid reasoning. 🤣

Apple has let their OpenGL implementation stagnate since 2010 [1].
They then officially deprecated it in 2018, citing significant
advantages of Metal over OpenGL [2]. They have not revealed when
OpenGL will be removed.

Most of Qt Quick works well with Metal -- it's only QQuickWidget that
doesn't. In contrast, the graphics API setting affects all of Qt
Quick. Furthermore, QQuickWidget has limitations [3] compared to other
ways of displaying a Qt Quick UI, so it shouldn't be the first choice
unless you really need to mix widgets with Qt Quick.

Given all this, I don't think it makes sense for Qt to default to
something that can be killed off any day now, just to make it easier
to use QQuickWidget.

In any case, I think the error message "QQuickWidget is only supported
on OpenGL. Use QQuickWindow::setGraphicsApi() to override the default"
is clear enough as a once-off message for those who want to use
QQuickWidget.


Regards,
Sze-Howe

[1] https://support.apple.com/en-us/HT202823
[2] https://venturebeat.com/2018/06/06/apple-defends-end-of-opengl-as-mac-game-developers-threaten-to-leave/
[3] https://doc.qt.io/qt-6/qquickwidget.html#performance-considerations


More information about the Interest mailing list