Remove SetSizeHints() and Fit() to fix main window issue.