调用窗体类的setWindowTitle()函数可以对窗体设置标题。窗体类继承于QWidget类,其setWindowTitle函数原型:void QWidget::setWindowTitle(const QString & title); //title是标题内容字符串。