网上搜索原因有两种 重写了mainwindow的show函数重写了setVisible(bool)函数 自己程序的原因 我写的 mainwindow 里有 tableWidget 类,增加 tableWidget 的 headerlabel 列名时忘记修改setColumncount(int) 的参数,导致程序崩溃,无法弹出窗体。