update examples/mainwindow.cpp