风泥

导航

2016年2月29日 #

调用外部程序

摘要: 调用外部程序,并且控制窗口是否显示bool StartProgram(QString filePath, bool bVisiable, bool bWaitting){#ifdef _MSC_VER STARTUPINFOW si; PROCESS_IN... 阅读全文

posted @ 2016-02-29 18:23 风泥 阅读(100) 评论(0) 推荐(0)

目录拷贝

摘要: 目录拷贝bool QtCopyDir(const QDir &fromDir, const QDir &toDir, bool bCoverIfFileExists){ QDir formDir_ = fromDir; QDir toDir_ = toDi... 阅读全文

posted @ 2016-02-29 18:23 风泥 阅读(109) 评论(0) 推荐(0)

使用while阻塞程序

摘要: 使用while阻塞程序,但不使程序卡死void BlockProgram(int mesc){ //mesc为阻塞时间 QElapsedTimer timer; timer.start(); while (timer.elapsed() < m... 阅读全文

posted @ 2016-02-29 18:23 风泥 阅读(212) 评论(0) 推荐(0)

函数指针的使用

摘要: 指针函数的定义与函数指针的使用类成员函数: 定义指针函数://声明指针函数typedef void (A::*PADDITEMFUNC)(void);class A{public: ... void addItem(void); ...};void ... 阅读全文

posted @ 2016-02-29 18:22 风泥 阅读(84) 评论(0) 推荐(0)

获取目录下指定类型的所有文件

摘要: 获取目录下指定类型的所有文件bool QtGetAllFiles(const QDir &fromDir, QStringList &fileList , const QStringList &filters){ //fromDir指定目录,fileLis... 阅读全文

posted @ 2016-02-29 18:22 风泥 阅读(196) 评论(0) 推荐(0)

获取有效的MAC地址

摘要: 获取有效的MAC地址QString getValidMacAddr(){ foreach(QNetworkInterface networkInferface, QNetworkInterface::allInterfaces()) { //... 阅读全文

posted @ 2016-02-29 18:22 风泥 阅读(293) 评论(0) 推荐(0)

windows utf8 转 utf16

摘要: windows utf8 转 utf16static int MdesUtf8ToUtf16 ( const char* src, wchar_t * dst ){#ifdef _MSC_VER int size = MultiByteToWideChar (... 阅读全文

posted @ 2016-02-29 18:21 风泥 阅读(185) 评论(0) 推荐(0)