- 论坛徽章:
- 0
|
QT4下无法通过:求助。。修改哪些部分
#include<qapplication>
#include<qwidget>
#include<qgroupbox>
#include<qlabel>
class myclass:public QWidget
{public:
myclass();
};
myclass::myclass()
{setGeometry(100,100,150,50);
QGroupBox *groupbox= new QGroupBox(this);
groupbox->setGeometry(10,10,130,30);
groupbox->setTitle("A group box");
QLabel *label=new QLabel(this);
label->setGeometry(30,35,90,40);
label->setText("add af ");
label->setAlignment(Qt::AlignHCenter);
}
int main(int argc,char **argv)
{QApplication a(argc,argv);
myclass w;
w.show();
a.exec();
} |
|