Update mainwindow.cpp

add comments