The problem is an incompatibility between Qt 4.8.x and the latest version of the flash plugin on OSX.
We opened an issue on Qt's Jira track system at
https://bugreports.qt-project.org/browse/QTBUG-32931, but it's still unresolved, and there's a duplicate of this question at Latest Flash Player for OS X not working with Qt 4.8.n applications.
Qt 5.x is working fine, anyway, so if you don't really need to stay on Qt4, just switch on the latest version of Qt and the same code should work.
come from :
stackoverflow