helloworld.cpp
来自「《Linux程序设计权威指南》一书qt下的源码」· C++ 代码 · 共 26 行
CPP
26 行
/* File: helloworld.c */ #include <qapplication.h> #include <qpushbutton.h> int main( int argc, char **argv ) { //定义Application QApplication a( argc, argv ); //建立按钮 QPushButton hello( "Hello world!", 0 ); //设置按钮尺寸 hello.resize( 100, 30 ); //在Application中加入按钮 a.setMainWidget( &hello ); //显示按钮 hello.show(); //进入循环 return a.exec(); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?