New layout for qt4 subplottool + QMainWindow -> QDialog

This supersedes #2112.