?? hbox_stretch.cpp
字號(hào):
#include <QApplication>#include <QPushButton>#include <QWidget>#include <QHBoxLayout>int main(int argc, char *argv[]){ QApplication app(argc, argv); QWidget window; QPushButton *button1 = new QPushButton("One"); QPushButton *button2 = new QPushButton("Two"); QPushButton *button3 = new QPushButton("Three"); QPushButton *button4 = new QPushButton("Four"); QPushButton *button5 = new QPushButton("Five"); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(button1, 1); layout->addWidget(button2, 2); layout->addWidget(button3, 3); layout->addWidget(button4, 4); layout->addWidget(button5, 5); window.setLayout(layout); window.setGeometry(20, 50, 700, 100); window.show(); return app.exec();}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -