?? 5_1.cpp
字號:
#include <qapplication.h>#include <qpushbutton.h>#include <qfont.h>#include <qscrollview.h>class MyMainWindow:public QScrollView{ public: MyMainWindow(); private: QPushButton *b1;};MyMainWindow::MyMainWindow(){ setGeometry(100,100,200,100); b1 = new QPushButton("This button is not too\n big for the window!",this); b1->setGeometry(10,10,180,80); b1->setFont(QFont("Times",18,QFont::Bold)); //we must call the QScrollView::addChild function for each of its child widgets. addChild(b1);}main(int argc,char **argv){ QApplication a(argc,argv); MyMainWindow w; a.setMainWidget(&w); w.show(); a.exec();}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -