Fixed errors with Qt native dialog in OS X. Separated directories and main model