Add QT_WIDGETS_LIB define when including QtWidgets module (need to push this upstream to the qt5.py maintainer).
Add missing QApplication include.
Fix DirectoryDao initialization order.