01- MainWindow

Screen_Shot_2016-03-19_at_1_38_58_PM
Screen_Shot_2016-03-19_at_2_26_34_PM
Screen Shot 2016-03-19 at 2.27.58 PM

Screen Shot 2016-03-19 at 2.27.32 PM

Screen Shot 2016-03-19 at 2.27.25 PM

mainwindows.cpp

#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
<%%KEEPWHITESPACE%%>    QMainWindow(parent),
<%%KEEPWHITESPACE%%>    ui(new Ui::MainWindow)
{
<%%KEEPWHITESPACE%%>    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
<%%KEEPWHITESPACE%%>    delete ui;
}

執行結果
Screen Shot 2016-03-19 at 2.31.16 PM

教學影片
QT-2-1-windows

QT
CH01簡介ch02 視窗