预览效果:

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. 用css、html编写一个两列布局的网页,名称为css.html ,要求左侧宽度为200px ,右侧自动扩展

    <body><div style=" float:left; width:200px; height:300px; border: 1px #0033FF solid;&q ...

  2. offsetTop、clientTop、scrollTop、offsetTop各属性介绍

    HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth scrollHeight: 获取对象的滚动高度. scrollLeft:设置或获取位于对 ...

  3. Java谜题——类谜题(二)

    1.域的隐藏 代码如下: class Base { public String className = "Base"; } class Derived extends Base { ...

  4. EF 报【序列包含一个以上的元素】解决办法

    1.检查模型是否存在重复的字段,eg: public class AggregateRoot { public System.Guid Guid { get; set; } } public part ...

  5. Mycat 安装配置

    下载https://github.com/MyCATApache/Mycat-download Mycat 需要jdk 环境,首先安装 jdk 安装完 jdk 环境以后 下载 mycat server ...

  6. 检测网站挂马程序(Python)

    系统管理员通常从svn/git中检索代码,部署站点后通常首先会生成该站点所有文件的MD5值,如果上线后网站页面内容被篡改(如挂马)等,可以比对之前生成MD5值快速查找去那些文件被更改,为了使系统管理员 ...

  7. (中等) HDU 5046 Airport ,DLX+可重复覆盖+二分。

    Description The country of jiuye composed by N cites. Each city can be viewed as a point in a two- d ...

  8. 51nod贪心算法教程

    51nod确实是一个好oj,题目质量不错,wa了还放数据,学习算法来说挺好的,这次我做了几个水的贪心,虽然水,但是确实都很典型. 教程链接:http://www.51nod.com/tutorial/ ...

  9. 位图文件(BMP)格式以及Linux下C程序实现(转)

    源:位图文件(BMP)格式以及Linux下C程序实现 说到图片,位图(Bitmap)当然是最简单的,它是Windows显示图片的基本格式,其文件扩展名为*.BMP.由于没有经过任何的压缩,故BMP图 ...

  10. 128階數的Shunt音量控制器

    源:128階數的Shunt音量控制器 紅外線遙控 - 256階Shunt音量及控制及音源 選擇器