Fix mainwindow geometry on macOS
We cannot set the window geometry directly in the mainwindow constructor for the macOS. The newest QT (since version 5.10) ignores window geometry set by user. We must set mainwindow geometry explicit outside the mainwindow constructor (in the main function).