📄 main.cpp
字号:
#include <qapplication.h>
#include <qpushbutton.h>
#include <qwidget.h>
int main( int argc, char **argv )
{
QApplication a(argc,argv);
QWidget mainwindow;
mainwindow.setMinimumSize(200,100);
mainwindow.setMaximumSize(200,200);
QPushButton Pb1( "Hello Yzf!",&mainwindow);
QPushButton Pb2( "Hello world!",&mainwindow);
Pb1.setGeometry(20,20,40,40);
Pb2.setGeometry(70,70,90,90);
a.setMainWidget(&mainwindow);
mainwindow.show();
return a.exec();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -