2011年5月9日

Linux下如何用QT检测到U盘已经插入,并实现mount与umount

摘要: Linux下如何用QT检测到U盘已经插入,并实现mount与umount因为开发一个自动插入U盘就自动复制,并且要能在复制开始前先对U盘进行格式化。想让Linux先对U盘进行格式化,然后再对U盘进行加载,加载完成后开始复制,复制完成后自动卸载。解决方法,使用qt自带的QDBus可以实现,下面为连接代码,当系统有设备插入时,可以调用slotDeviceAdded函数。Copy code... 阅读全文

posted @ 2011-05-09 11:56 风乔 阅读(3964) 评论(0) 推荐(0) 编辑

c++ 读取图片RGB

摘要: #include"stdio.h"#include"iostream.h"#include"string.h"#include #include"stdlib.h"#include"windows.h"unsigned char *pBmpBuf;//读入图像数据的指针int bmpWidth;//图像的宽int bmpHeight;//图像的高RGBQUAD *pColorTable;//颜色表... 阅读全文

posted @ 2011-05-09 11:09 风乔 阅读(3703) 评论(0) 推荐(0) 编辑

导航