嵌入式实验报告 QT部分 --基于QT 实现一个简易画图板 姓名:冯建建 班级:软件 7 1 学号:0 7 1 6 1 0 0 7 学院:软件学院 日期:2 0 1 0 -1 0 -2 5 一、 实验目的 1, 了解并掌握Qt集成开发环境下使用Qt Designer开发图形界面程序的流程和相关操作; 2, 了解并掌握 Qt 的信号槽和信号传递机制,并通过具体应用加深理解; 3, 了解并掌握使 Qt 应用程序支持中文或国际化的方法,并在本次实验中使用; 4, 了解并掌握 QPainter 的 translate、shear 等库函数的使用方法和 Widget 类的使用方法,并通过本次实验加深理解; 5, 掌握在 Qt Designer 界面上为菜单项添加工具栏按钮、创建相应槽函数的方法; 6, 了解并掌握使用双缓冲机制绘图的方法
二、 实验环境 操作系统:Window s 7 应用软件:Qt Creator 开发平台:qt-sdk-w in-opensource-2009
04 三、 程序流程图: 四、 核心源代码 mainw indow
cpp 的内容(实现菜单项的功能和绘图功能的调用) #include "mainwindow
h" #include "ui_mainwindow
h" #include "donewdialog
h" #include #include #include #include "aboutdialog
h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setWindowTitle(tr("Qt绘图板")); setFixedSize(700,500); //主窗口大小设为