⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 7_3.cpp

📁 一个qt设计的教程
💻 CPP
字号:
#include <qapplication.h>#include <qwidget.h>#include <qgroupbox.h>#include <qlabel.h>class MyMainWindow:public QWidget{ public:    MyMainWindow(); private:    QGroupBox *groupbox;    QLabel *label;};MyMainWindow::MyMainWindow(){ setGeometry(100,100,150,100);  groupbox = new QGroupBox(this); groupbox->setGeometry(10,10,130,80); groupbox->setTitle("A Group BOx"); label = new QLabel(this); label->setGeometry(30,35,90,40); label->setText("Add widgets\n here!"); label->setAlignment(AlignHCenter|AlignVCenter);}main(int argc,char **argv){ QApplication a(argc,argv); MyMainWindow w; a.setMainWidget(&w); w.show(); a.exec();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -