上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 68 下一页
摘要: 1 #include "mainwindow.h" 2 #include "ui_mainwindow.h" 3 #include 4 #include 5 #include 6 7 MainWindow::MainWindow(QWidget *parent) : 8 QMainWindow(parent), 9 ui(new Ui::MainWind... 阅读全文
posted @ 2018-04-09 10:00 喵小喵~ 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 文件对话框 #include<QFileDialog> 1 //文件对话框 2 void Dialog::on_pushButton_clicked() 3 { 4 //定义显示文件的类型 窗口标题 可供选择的类型 5 QString qstr = QFileDialog::getOpenFileN 阅读全文
posted @ 2018-04-08 23:09 喵小喵~ 阅读(2203) 评论(0) 推荐(0) 编辑
摘要: mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QTextEdit> 6 #include <QEvent> 7 #include <QtEvents> 阅读全文
posted @ 2018-04-08 21:36 喵小喵~ 阅读(251) 评论(0) 推荐(0) 编辑
摘要: mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QKeyEvent> 6 7 namespace Ui { 8 class MainWindow; 9 阅读全文
posted @ 2018-04-08 21:16 喵小喵~ 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 头文件 1 #include <QMouseEvent> 2 #include <QStatusBar> 3 #include <QLabel> 1 protected: 2 //鼠标按下 3 void mousePressEvent(QMouseEvent *e); 4 //鼠标移动 5 void 阅读全文
posted @ 2018-04-08 19:50 喵小喵~ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 头文件 1 #include <QHBoxLayout> 2 #include <QPushButton> 3 #include <QVBoxLayout> 4 #include <QLineEdit> 5 #include <QLabel> mainwindow.cpp 1 #include "m 阅读全文
posted @ 2018-04-08 19:09 喵小喵~ 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 运行效果 关键代码: dialog.h 1 #ifndef DIALOG_H 2 #define DIALOG_H 3 4 #include <QDialog> 5 #include <QTextEdit> 6 #include <QComboBox> 7 #include <QLineEdit> 阅读全文
posted @ 2018-04-08 17:52 喵小喵~ 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 Dialog::Dialog(QWidget *parent) : 2 QDialog(parent), 3 ui(new Ui::Dialog) 4 { 5 ui->setupUi(this); 6 7 list = new QListWidget(this); 8 list->insertItem(0,"win1"); 9 ... 阅读全文
posted @ 2018-04-08 17:37 喵小喵~ 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 运行效果 包含头文件 关键代码 阅读全文
posted @ 2018-04-08 17:04 喵小喵~ 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 1 int main(int argc, char *argv[]) 2 { 3 QApplication a(argc, argv); 4 //MainWindow w; 5 //w.show(); 6 //左右分割 7 QSplitter *spmain = new QSplitter(Qt::Horizontal,0); 8 ... 阅读全文
posted @ 2018-04-08 16:49 喵小喵~ 阅读(202) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 68 下一页