[Interest] My experience porting to Qt5 (on OS X)

Till Oliver Knoll till.oliver.knoll at gmail.com
Sun Sep 2 13:38:33 CEST 2012


Hi,

I installed the Qt 5 beta 1 yesterday for the first time and started 
porting my application (a small "visual effects editor" consisting of a 
couple of libraries and executable - so nothing big).

The effor was indeed very painless: in my case I mainly had to adjust a 
few #include (<QtGui/Whatever> -> <QtWidgets/Whatever>) and change 
QDir::convertSeparators to QDir::toNativeSeparators.

After solving another glitch (add 'widgets' to QT configuration!) I was 
ready to go, everything compiled and linked!


GOOD:

- "Lion Fullscreen" is now supported out of the box (so I can get rid of 
my native API hacking :)) However it seems that the "fullscreen" option 
is added to every main window by default. Not sure whether I really want 
this (should be a window configuration flag maybe - or maybe that's 
already present as an option?)

- Scrollbars behave as epected on (Mountain) Lion! They disappear and 
re-appear when hovering with the mouse over it

- All my application logic still seems to work (showing dialogs, 
shortcuts, ...) :)


BAD:

- It seems that touch events are not recognised anymore by my 
QGraphicsSceneView

- Lots of rendering artifacts (mostly seems like a "refresh" problem: 
old pixel "blocks" remain on the screen until a repaint is enforced, 
e.g. by rescaling the window - can also be observed with the Qt 5 
Designer etc.)

- setUnifiedTitleAndToolBarOnMac(true) doesn't seem to have an effect 
anymore:

   THIS IS AN ABSOLUTE SHOW-STOPPER ON MAC!

I also tried in combination with 
QApplication::setGraphicsSystem("native"), but I guess the later has 
become a "placebo API" anyway

- Further little quirks, e.g. it happened that the main window suddenly 
disappeared when the sheet dialog "Save before quit" should have 
appeared. But I need to investigate in more detail on these issues.

- The QEvent::ActivationChange event doesn't seem to be propagated to my 
main window (at least not in the same way it did as on Qt 4.8) when my 
application first shows the main window - only when I do a resize of the 
window I get the activation change event.





More information about the Interest mailing list