预览效果:

Maze.pro文件

 #-------------------------------------------------
#
# Project created by QtCreator --26T14::
#
#------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, ): QT += widgets TARGET = Maze
TEMPLATE = app SOURCES += main.cpp\
mainwindow.cpp \
MAZE.cpp \
DijkstraWindow.cpp \
head.cpp HEADERS += mainwindow.h \
MAZE.h \
DijkstraWindow.h \
head.h FORMS += \
head.ui RESOURCES += \
img.qrc
DijkstraWindow.h文件
 #ifndef DIJKSTRAWINDOW_H
#define DIJKSTRAWINDOW_H #include <QWidget>
#include <iostream>
#include <QTime>
#include <QLineEdit>
#include <QPushButton>
#include <QPainter>
#include <QLabel>
#include <QMessageBox>
#include <QDebug>
#include <QKeyEvent>
#include <QPixmap>
#include <QTextEdit> class DijkstraWindow : public QWidget
{
Q_OBJECT public: DijkstraWindow(QWidget *parent = );
// void paintEvent(QPaintEvent *);
// void keyPressEvent(QKeyEvent *e);
void dijkstra();
void set_n(int tn){n = tn;}
int get_n(){return n;}
void set_m(int tm){m = tm;}
int get_m(){return m;}
~DijkstraWindow();
private:
QTextEdit *te_datain;
QPushButton *queding;
QLabel *bushu, *huafei, *bushuOut, *huafeiOut, *shuoming;
int n, m, s, t;
private slots:
void startDijkstra();
};
#endif // DIJKSTRAWINDOW_H

head.h文件

 #ifndef HEAD_H
#define HEAD_H #include <QWidget>
#include "DijkstraWindow.h"
#include "mainwindow.h" namespace Ui {
class Head;
} class Head : public QWidget
{
Q_OBJECT public:
explicit Head(QWidget *parent = );
~Head(); private slots:
void on_pushButton_clicked(); void on_pushButton_2_clicked(); private:
Ui::Head *ui;
DijkstraWindow d;
MainWindow w;
}; #endif // HEAD_H

mainwindow.h文件

 #ifndef MAINWINDOW_H
#define MAINWINDOW_H #include "MAZE.h"
#include <QMainWindow>
#include <QWidget>
#include <iostream>
#include <QTime>
#include <QLineEdit>
#include <QPushButton>
#include <QPainter>
#include <QLabel>
#include <QMessageBox>
#include <QDebug>
#include <QKeyEvent>
#include <QPixmap> class MainWindow : public QWidget
{
Q_OBJECT public:
MainWindow(QWidget *parent = );
void paintEvent(QPaintEvent *);
void keyPressEvent(QKeyEvent *e);
~MainWindow();
private:
QLabel *ql_shuru,*ql_bushu, *ql_bushuOut, *yongshi, *yongshiOut;
QLineEdit *infile;
QPushButton *queding;
QPushButton *zhaolu;
MAZE *m;
int X = ;
int Y = ;
bool bfs_fg = false;
private slots:
void startMaze();
void startBFS();
}; #endif // MAINWINDOW_H

MAZE.h文件

 #ifndef MAZE_H
#define MAZE_H static const int N = ; class MAZE
{
public:
int maze[N][N];
struct point
{
int x, y, pre;
}q[N*N], path[N*N];
MAZE();
void set_n(int tn);
int get_n();
int get_len_path(){return len_path;}
void set_len_path(int tn){len_path = tn;}
void printPath()
{
bfs();
for(int i = len_path-; i >= ; i--)
if(maze[path[i].x][path[i].y]==)
maze[path[i].x][path[i].y] = ;
}
void recoverPath()
{
for(int i = len_path-; i >= ; i--)
if(maze[path[i].x][path[i].y]==)
maze[path[i].x][path[i].y] = ;
}
void mazeInit();
int searchPath(int x, int y);
void print();
~MAZE();
private:
int n, len_path, nn;
void bfs();
void getPath(int pos);
}; #endif // MAZE_H
DijkstraWindow.cpp文件
 #include "DijkstraWindow.h"
#include <cstring>
#include <iostream>
#include <QString>
#include <QStringList> static const int maxn = ;
static const int inf = ;
int Tu_dist[maxn][maxn], Tu_pay[maxn][maxn], dis[maxn], pay[maxn], book[maxn]; DijkstraWindow::DijkstraWindow(QWidget *parent)
: QWidget(parent)
{
this->setFixedSize(,); shuoming = new QLabel(this);
shuoming->setText("说明:第一行输入4个数,分别表示\n点的个数,边的个数,起点,终点。\n之后每一行输入4个数u、v、d、p,\n表示u和v之间有一条长度为d的路,需\n要p的花费。给出图,可计算起点到终\n点的最短距离及其花费,如果最短距\n离有多条路线,则输出花费最少的。");
shuoming->setGeometry(, , , ); te_datain = new QTextEdit(this);
te_datain->setText("3 2 1 3\n1 2 5 6\n2 3 4 5");
te_datain->setGeometry(, , , ); queding = new QPushButton(this);
queding->setText("确定");
queding->setGeometry(, , , ); bushu = new QLabel(this);
bushu->setText("最短路径长度:");
bushu->setGeometry(, , , ); bushuOut = new QLabel(this);
bushuOut->setText("");
bushuOut->setGeometry(, , , ); huafei = new QLabel(this);
huafei->setText("花费:");
huafei->setGeometry(, , , ); huafeiOut = new QLabel(this);
huafeiOut->setText("");
huafeiOut->setGeometry(, , , ); connect(queding,SIGNAL(clicked()),this,SLOT(startDijkstra()));
} void DijkstraWindow::startDijkstra()
{ int a, b, d, p;
//QString str = te_datain->toPlainText();
int line_n=te_datain->document()->lineCount();
if(line_n != )
{
for(int i = ; i < line_n; i++)
{
QString str=te_datain->toPlainText().section('\n',i-line_n,i-line_n,QString::SectionSkipEmpty);
QStringList strlist=str.split(" ");
if(i == )
{
n = strlist[].toInt();
m = strlist[].toInt();
s = strlist[].toInt();
t = strlist[].toInt();
for(int i = ; i <= n; i++)
for(int j = ; j <= n; j++)
{
Tu_dist[i][j] =inf;
Tu_pay[i][j] = inf;
}
//std::cout<<n<<" "<<m<<" "<<s<<" "<<t<<std::endl;
}else
{
a = strlist[].toInt();
b = strlist[].toInt();
d = strlist[].toInt();
p = strlist[].toInt();
if(d<Tu_dist[a][b])
{
Tu_dist[a][b] = Tu_dist[b][a] = d;
Tu_pay[a][b] = Tu_pay[b][a] = p;
}
//std::cout<<a<<" "<<b<<" "<<d<<" "<<p<<std::endl;
}
} for(int i = ; i <= n; i++)
{
dis[i] = Tu_dist[s][i];
pay[i] = Tu_pay[s][i];
} memset(book, , sizeof(book));
book[s] = ;
dis[s] = ;
pay[s] = ; int mindist, u, v;
for(int i = ; i < n; i++)
{
mindist = inf;
for(int j = ; j <= n; j++)
{
if(book[j]==&&dis[j]<mindist)
{
mindist = dis[j];
u = j;
}
}
book[u] = ;
for(int v = ; v <= n; v++)
{
if(!book[v] && Tu_dist[u][v]<inf)
{
if(dis[v]>dis[u]+Tu_dist[u][v])
{
dis[v] = dis[u]+Tu_dist[u][v];
pay[v] = pay[u]+Tu_pay[u][v];
}
else if(dis[v]==(dis[u]+Tu_dist[u][v]))
pay[v] = (pay[u]+Tu_pay[u][v])<pay[v]?pay[u]+Tu_pay[u][v]:pay[v];
}
}
}
QString str;
bushuOut->setText(str.setNum(dis[t]));
huafeiOut->setText(str.setNum(pay[t])); update();
}
} DijkstraWindow::~DijkstraWindow()
{ }

head.cpp文件

 #include "head.h"
#include "ui_head.h" Head::Head(QWidget *parent) :
QWidget(parent),
ui(new Ui::Head)
{
ui->setupUi(this);
} Head::~Head()
{
delete ui;
} void Head::on_pushButton_clicked()
{
w.show();
} void Head::on_pushButton_2_clicked()
{
d.show();
}

main.cpp文件

 #include "head.h"
#include <QApplication> int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Head h;
h.show(); return a.exec();
}

mainwindow.cpp文件

 #include "mainwindow.h"
#include "MAZE.h"
#include <iostream>
#include <time.h>
//#include <QTimer> #define size 20
using namespace std;
MainWindow::MainWindow(QWidget *parent)
: QWidget(parent)
{
int n = ;
m = new MAZE();
m->set_n(n);
m->mazeInit();
m->print();
//m->printPath();
this->setWindowTitle("迷宫");
this->setFixedSize((n+)*size,n*size);
//this->resize((n+10)*size,n*size);
this->setFocus(Qt::MouseFocusReason);
QPalette pa;
pa.setColor(QPalette::WindowText,Qt::black);
QFont ft;
ft.setPointSize(); ql_shuru = new QLabel(this);
ql_shuru->setText("迷宫大小");
ql_shuru->setPalette(pa);
ql_shuru->setFont(ft);
ql_shuru->setGeometry((n+)*size, *size, , ); infile = new QLineEdit(this);
infile->setText("");
infile->setGeometry((n+)*size, *size, , ); queding = new QPushButton(this);
queding->setText("创建");
queding->setGeometry((n+)*size, *size, ,); zhaolu = new QPushButton(this);
zhaolu->setText("找最短路");
zhaolu->setGeometry((n+)*size, (n-)*size, ,); ql_bushu = new QLabel(this);
ql_bushu->setText("最短路步数");
ql_bushu->setGeometry((n+)*size, (n-)*size, ,); //QString str;
ql_bushuOut = new QLabel(this);
//ql_bushuOut->setText(str.setNum(m->get_len_path()));
ql_bushuOut->setText("");
ql_bushuOut->setGeometry((n+)*size, (n-)*size, ,); yongshi = new QLabel(this);
yongshi->setText("用时");
yongshi->setGeometry((n+)*size, (n-)*size, ,); yongshiOut = new QLabel(this);
yongshiOut->setText("");
yongshiOut->setGeometry((n+)*size, (n-)*size, ,); connect(queding,SIGNAL(clicked()),this,SLOT(startMaze()));
connect(zhaolu,SIGNAL(clicked()),this,SLOT(startBFS()));
} MainWindow::~MainWindow()
{ } void MainWindow::paintEvent(QPaintEvent *)
{
QPainter painter(this);
// 反走样 painter.setRenderHint(QPainter::Antialiasing, true);
// 绘制图标 painter.drawPixmap(rect(), QPixmap(":/img/nwafu.jmp"));
//painter.setPen(Qt::black);
//painter.setRenderHint(QPainter::Antialiasing, true);// 设置画笔颜色、宽度
//painter.setPen(QPen(QColor(0, 160, 160), 1));
int n = m->get_n();
for(int i = ; i < n; i++)
{
for(int j = ; j < n; j++)
{
if(m->maze[i][j] ==){
painter.setPen(Qt::darkCyan);
painter.setBrush(QBrush(Qt::darkCyan,Qt::SolidPattern));
painter.drawRect(QRect(j*size,i*size,size,size));
}else if(m->maze[i][j] == ){
// painter.setPen(Qt::darkMagenta);
// painter.setBrush(QBrush(Qt::darkMagenta,Qt::SolidPattern));
// painter.drawRect(QRect(j*size,i*size,size,size));
painter.drawPixmap(j*,i*,,,QPixmap(":/new/prefix1/img/panda2.jpg").scaled(,));
}else if(m->maze[i][j] == ){
painter.setPen(Qt::red);
painter.setBrush(QBrush(Qt::red,Qt::SolidPattern));
painter.drawRect(QRect(j*size,i*size,size,size));
painter.drawPixmap(j*,i*,,,QPixmap(":/new/prefix1/img/bamboo.jpg").scaled(,));
}else if(m->maze[i][j] == ){
painter.setPen(Qt::white);
painter.setBrush(QBrush(Qt::white,Qt::SolidPattern));
painter.drawRect(QRect(j*size,i*size,size,size));
}else if(m->maze[i][j] == ){
// painter.setPen(Qt::darkGray);
// painter.setBrush(QBrush(Qt::darkGray,Qt::SolidPattern));
// painter.drawRect(QRect(j*size,i*size,size,size));
painter.drawPixmap(j*,i*,,,QPixmap(":/new/prefix1/img/foot.jpg").scaled(,));
}
}
}
} void MainWindow::keyPressEvent(QKeyEvent *e)
{
if(bfs_fg){
m->recoverPath();
bfs_fg = false;
ql_bushuOut->setText("");
update();
}
int tx = X, ty = Y;
int n = m->get_n();
if(e->key()==||e->key()==)//上
{
if(X> && m->maze[X-][Y] != )
{
X=X-;
}
}
else if(e->key()==||e->key()==)//下
{
if(X<n- && m->maze[X+][Y] != )
{
X=X+;
}
}
else if(e->key()==||e->key()==)//左
{
if(Y> && m->maze[X][Y-] != )
{
Y=Y-;
}
}
else if(e->key()==||e->key()==)//右
{ if(Y<n- && m->maze[X][Y+] != )
{
Y=Y+;
}
}
int tmp = m->maze[X][Y];
if(tmp == ){
QMessageBox::information(this,"提示","到达终点",QMessageBox::Yes);
}else{
m->maze[X][Y] = m->maze[tx][ty];
m->maze[tx][ty] = tmp;
}
update();
} void MainWindow::startMaze()
{
int n = infile->text().toInt();
//n = 2*n+2;
if(n<)n = ;
if(n>)n = ;
if(n% == )n++;
this->setFixedSize((n+)*size,n*size);
//this->resize((n+10)*size,n*size); // ql_shuru->setText("请输入迷宫的大小");
ql_shuru->setGeometry((n+)*size, *size, , );
infile->setGeometry((n+)*size, *size, , );
//queding->setText("创建");
queding->setGeometry((n+)*size, *size, ,);
//zhaolu->setText("找最短路");
zhaolu->setGeometry((n+)*size, (n-)*size, ,);
//ql_bushu->setText("最短路步数");
ql_bushu->setGeometry((n+)*size, (n-)*size, ,);
ql_bushuOut->setText("");
ql_bushuOut->setGeometry((n+)*size, (n-)*size, ,);
yongshi->setGeometry((n+)*size, (n-)*size, ,);
yongshiOut->setGeometry((n+)*size, (n-)*size, ,);
m->set_n(n);
m->mazeInit();
X = , Y = ;
this->setFocus(Qt::MouseFocusReason);
update();
} void MainWindow::startBFS()
{
time_t start, end;
time(&start);
m->printPath();
time(&end);
double cost = difftime(end,start);
QString str;
ql_bushuOut->setText(str.setNum(m->get_len_path()));
yongshiOut->setText(str.setNum(cost));
//cout<<"ok"<<endl;
bfs_fg = true;
this->setFocus(Qt::MouseFocusReason);
update();
}

MAZE.cpp文件

 #include "MAZE.h"
#include <iostream>
#include <windows.h>
#include <cstdio>
#include <cmath>
#include <time.h>
#include <cstring>
using namespace std;
int fa[N*N];
int dx[] = {, , -, };
int dy[] = {, , , -}; MAZE::MAZE(){} void MAZE::set_n(int tn)
{
n = tn;
nn = n/;
} int MAZE::get_n()
{
return n;
} void MAZE::print()
{
bfs();
// for(int i = 0; i < n; i++)
// {
// for(int j = 0; j < n; j++)
// cout<<maze[i][j]<<" ";
// cout<<endl;
// }
} void init()
{
for(int i = ; i < N*N; i++)
fa[i] = i;
} int getfa(int x)
{
if(fa[x] == x)return x;
else return fa[x] = getfa(fa[x]);
} void Merge(int a, int b)
{
int af = getfa(a);
int bf = getfa(b);
if(af != bf)
fa[bf] = af;
} int tolist(int x, int y, int n)
{
return x*n+y;
} void MAZE::mazeInit()
{
for(int i=; i<=nn*+; ++i)
for(int j=; j<=nn*+; ++j)
maze[i][j] = ; for(int i=, j=*nn+; i<=*nn+; ++i)
{
maze[i][] = ;
maze[i][j] = ;
}
for(int i=, j=*nn+; i<=*nn+; ++i)
{
maze[][i] = ;
maze[j][i] = ;
}
maze[][] = ;
maze[*nn][*nn+] = ; srand((unsigned)time(NULL));
searchPath(rand()%nn+, rand()%nn+); for(int i = ; i < n; i++)
{
for(int j = ; j < n; j++)
{
maze[i][j] = maze[i+][j+];
}
} len_path = ;
// int sx, sy, ex, ey, x, y;
// init();
// for(int i = 0; i < n; i++)
// for(int j = 0; j < n; j++)
// maze[i][j] = 1;
// for(int i = 1; i < n; i++)
// {
// if(i&1)
// for(int j = 1; j < n; j+=2)
// maze[i][j] = 0;
// }
// //print(n);
// //cout<<"*********************"<<endl;
// srand(time(NULL));
// int d;
// int tx1, ty1, tx2, ty2;
// sx = sy = 1;
// ex = ey = n-3; // //cout<<"ok"<<endl;
// maze[sx][sy] = maze[ex][ey] = 0;
// while(getfa(tolist(sx, sy, n)) != getfa(tolist(ex, ey, n)))
// {
// do
// {
// x = rand()%(n-2)+1;
// y = (rand()+2333)%(n-2)+1;
// }
// while(maze[x][y] != 1);
// d = x%2;
// if(!d)
// {
// tx1 = x+1;
// ty1 = y;
// tx2 = x-1;
// ty2 = y;
// if(getfa(tolist(tx1, ty1, n)) != getfa(tolist(tx2, ty2, n)))
// {
// maze[x][y] = 0;
// Merge(tolist(tx1, ty1, n), tolist(tx2, ty2, n));
// }
// }
// else
// {
// tx1 = x;
// ty1 = y+1;
// tx2 = x;
// ty2 = y-1;
// if(getfa(tolist(tx1, ty1, n)) != getfa(tolist(tx2, ty2, n)))
// {
// maze[x][y] = 0;
// Merge(tolist(tx1, ty1, n), tolist(tx2, ty2, n));
// }
// }
// }
// for(int i = 0; i < n; i++)
// {
// maze[i][n-1] = 1;
// maze[n-1][i] = 1;
// }
// maze[sx][sy] = 2;
// maze[ex][ey] = 3;
//print();
} int MAZE::searchPath(int x, int y)
{
static int dir[][] = {, , , , , -, -, };
int zx = x*;
int zy = y*;
int next, turn, i;
maze[zx][zy] = ;
turn = rand()% ? : ;
for(i=, next=rand()%; i<; ++i, next=(next+turn)%)
if(maze[zx+*dir[next][]][zy+*dir[next][]] == )
{
maze[zx+dir[next][]][zy+dir[next][]] = ;
searchPath(x+dir[next][], y+dir[next][]);
}
return ;
} void MAZE::getPath(int pos)
{
while(pos != -)
{
path[len_path].x = q[pos].x;
path[len_path].y = q[pos].y;
len_path++;
pos = q[pos].pre;
}
} void MAZE::bfs()
{
int front, tail, sx, sy;
for(int i = ; i < n; i++)
for(int j = ; j < n; j++)
if(maze[i][j] == )
{
sx = i; sy = j;
}
front = tail = ;
q[tail].x = sx;
q[tail].y = sy;
q[tail].pre = -;
tail++;
int x, y, nx, ny;
bool fg = false;
while(front < tail)
{
x = q[front].x;
y = q[front].y;
for(int i = ; i < ; i++)
{
nx = x+dx[i];
ny = y+dy[i];
if(nx>=&&nx<n&&ny>=&&ny<n&&maze[nx][ny]==)
{
maze[nx][ny] = ;
q[tail].x = nx;
q[tail].y = ny;
q[tail].pre = front;
tail++;
}
if(maze[nx][ny] == ){
q[tail].x = nx;
q[tail].y = ny;
q[tail].pre = front;
tail++;
fg = true;
len_path = ;
path[len_path].x = nx;
path[len_path].y = ny;
len_path++;
getPath(front);
}
}
if(fg)break;
front++;
}
for(int i = ; i < n; i++)
for(int j = ; j < n; j++)
if(maze[i][j] == )
maze[i][j] = ;
}

head.ui文件

 <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Head</class>
<widget class="QWidget" name="Head">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>351</width>
<height>220</height>
</rect>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="windowTitle">
<string>Maze</string>
</property>
<property name="windowIcon">
<iconset resource="img.qrc">
<normaloff>:/new/prefix1/img/xingong.jpg</normaloff>:/new/prefix1/img/xingong.jpg</iconset>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>50</x>
<y>140</y>
<width>101</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background: rgb(0, 170, 127)</string>
</property>
<property name="text">
<string>Maze</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>200</x>
<y>140</y>
<width>101</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">background: rgb(0, 170, 127)</string>
</property>
<property name="text">
<string>Dijkstra</string>
</property>
</widget>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>-1</x>
<y>-1</y>
<width>351</width>
<height>221</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/new/prefix1/img/mazeimg.jpg);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
<zorder>frame</zorder>
<zorder>pushButton</zorder>
<zorder>pushButton_2</zorder>
</widget>
<resources>
<include location="img.qrc"/>
</resources>
<connections/>
</ui>

数据结构实习-迷宫(基于Qt实现)的更多相关文章

  1. 数据结构实习 Problem H 迷宫的最短路径

    数据结构实习 Problem H 迷宫的最短路径 题目描述 设计一个算法找一条从迷宫入口到出口的最短路径. 输入 迷宫的行和列m n 迷宫的布局 输出 最短路径 样例输入 6 8 0 1 1 1 0 ...

  2. 【Qt编程】基于Qt的词典开发系列--后序

    从去年八月份到现在,总算完成了词典的编写以及相关技术文档的编辑工作.从整个过程来说,文档的编写比程序的实现耗费的时间更多.基于Qt的词典开发系列文章,大致包含了在编写词典软件过程中遇到的技术重点与难点 ...

  3. 基于QT的webkit与ExtJs开发CB/S结构的企业应用管理系统

      一:源起       1.何为CB/S的应用程序       C/S结构的应用程序,是客户端/服务端形式的应用程序,这种应用程序要在客户电脑上安装一个程序,客户使用这个程序与服务端通信,完成一定的 ...

  4. 基于QT的换肤整体解决方案(QSkinStyle)(提供Linux的XP风格)

    基于QT的换肤整体解决方案(QSkinStyle) 对QT这个成功的跨平台GUI库,本身内置了对换肤功能的实现,比如cleanlooks.plastique等跨平台风格:还有一些是和平台相关的风格,比 ...

  5. Lumina将是基于 Qt工具箱,旨在取代KDE成为PC-BSD默认的桌面环境

    Lumina Desktop 1.1.0 发布了,该版本是重要更新,包括全新的以及完全重新编写的utilities,并对底层基础架构进行改进. Lumina将是基于 Qt工具箱,旨在取代KDE成为PC ...

  6. 基于Qt的开源音乐播放器(CZPlayer)

    CZPlayer CZPlayer是基于Qt开发的一款功能强大的音乐播放器,该播放器的论坛地址请点击here,目前CZPlayer已经是第四个版本了,历史版本也分别在我的github上, github ...

  7. 基于QT的一个简易的安防

    工程描述 opencv2.4.8 QT5 背景建模后,当有异物入侵时,把入侵的帧写到视频文件 使用BackgroundSubtractorMOG2背景建模 程序基于QT对话框 .pro #------ ...

  8. 基于Qt的P2P局域网聊天及文件传送软件设计

    基于Qt的P2P局域网聊天及文件传送软件设计 zouxy09@qq.com http://blog.csdn.net/zouxy09         这是我的<通信网络>的课程设计作业,之 ...

  9. 基于Qt的第三方库和控件

    ====================== 基于Qt的第三方库和控件 ======================     libQxt --------   http://dev.libqxt.o ...

随机推荐

  1. ural1003 Parity

    Parity Time limit: 2.0 secondMemory limit: 64 MB Now and then you play the following game with your ...

  2. php dependency innjection

    You’ve probably heard of the acronym SOLID by now, which is an object oriented programming paradigm ...

  3. ubuntu 系统 opencv3.1.0 安装

    opencv编译安装 编译环境安装: sudo apt-get install build-essential 必需包安装: sudo apt-get install cmake git libgtk ...

  4. 关于OC和Swift使用GIT创建项目

    1.先进入码云,点击自己的头像 ->   ,2.里面有一个SSH公钥,点击   ,3.之后在终端输入 ssh-keygen -t rsa -C “xxxxx@xxx.com”,注意:”” 要用英 ...

  5. 模块之字节编译的.pyc文件---from.import语句

    字节编译的.pyc文件输入一个模块相对来说是一个比较费时的事情,所以Python做了一些技巧,以便使输入模块更加快一些.一种方法是创建 字节编译的文件 ,这些文件以.pyc作为扩展名.字节编译的文件与 ...

  6. displayport-2

    上一章讲述了display-port的硬件连接,今天来说说协议层 图中可以看到,最底层是物理层,上层是连接服务层,提供的服务包括同步数据传输服务,aux链接服务,aux设备数据传输服务,在设备端也一样 ...

  7. S3C2440串口及其中断系统详解

    个独立异步串行I/O(SIO)端口,每个都可以是基于中断或基于DMA模式的操作.换句话说,UART可以通过产生中断或DMA请求来进行CPU和UART之间的数据传输. 字节的FIFO给发送和接收. 字节 ...

  8. yum groupinstall "Development Tools" 批量安装软件

    注:可以通过 yum grouplist 来查看可能批量安装哪些列表 从Windows转到Linux下面,一个不习惯的地方就是在图形界面下安装和删除软件的时候非常缓慢.但是如果你掌握了用yum的命令行 ...

  9. view添加阴影无效

    需求:需要给cell里的imageview添加阴影 问题:按照标准的代码添加阴影,然并卵:代码如下: imageview.layer.shadowColor = [[UIColor blackColo ...

  10. 算法系列001---dfs|多叉|解空间树理解

    1.研究范围 1)多叉树,图的遍历 2)回溯法的解空间树=多叉树的遍历 2.研究方法 我们现在研究的是多叉树的遍历,突然想到为什么不能直接用二叉树的遍历方法呢?我们抱着这个问题,先找到多叉树的结构不同 ...