是在我的原有界面上加。没有parent.这样还是不行啊。。。
QDialog dialog;
dialog.setWindowFlags(Qt::SplashScreen);
QHBoxLayout *layout=new QHBoxLayout;
QLabel *label=new QLabel("Cost:1000");
layout->addWidget(label);
setLayout(layout);
setFixedHeight(sizeHint().height());
dialog.exec();