文章分类 -  QT

Qt报错:LIBCMTD.lib(exe_winmain.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) 中被引用
摘要:解决方法:新增qtmaind.lib 阅读全文

posted @ 2017-05-19 14:38 阿兴的平凡世界 阅读(2273) 评论(0) 推荐(0)

Qt base64字符串转图片loadFromData报“引发了异常: 读取访问权限冲突。 QGuiApplicationPrivate::platformIntegration(...) 返回 nullptr”问题
摘要:解决方法:将QPixmap换成QImage就可以了,其实达到的效果是一样的 阅读全文

posted @ 2017-05-17 09:46 阿兴的平凡世界 阅读(809) 评论(0) 推荐(0)

Qt删除指定文件夹里的所有文件(设置过滤)
摘要:bool AppClass::zsHelperClearCacheFile() { QDir dir(_zsHelperCachePath); QFileInfoList fileList; QFileInfo curFile; if (!dir.exists()) { return false; 阅读全文

posted @ 2017-04-20 17:56 阿兴的平凡世界 阅读(2065) 评论(0) 推荐(0)

QT QString, wchar_t *, TCHAR, CString和其他字符或字符串类型的转化
摘要:转发自:http://blog.csdn.net/qq61394323/article/details/28391579 (努力的草根) //QString to wchar_t *:const wchar_t * encodedName = reinterpret_cast<const wchar 阅读全文

posted @ 2017-04-20 10:03 阿兴的平凡世界 阅读(344) 评论(0) 推荐(0)

Qt获取文件版本号和文件版本号的方法:
摘要:QString getFileVertion(QString fullName){ QString result = ""; char* pData = nullptr; do { DWORD dwLen = GetFileVersionInfoSize(fullName.toStdWString( 阅读全文

posted @ 2017-04-17 16:11 阿兴的平凡世界 阅读(3762) 评论(1) 推荐(0)

异常:This application failed to start because it could not find or load the Qt platform plugin "windows"
摘要:解决步骤: 第一步:检查我们是否已经将windows.lib和Qt5PlatformSupport.lib这两个库链接,如果没有链接,我们需要先链接; 第二步:如果发现第一步还是没能解决问题,我们就需要将#include <QtPlugin> Q_IMPORT_PLUGIN(QWindowsInte 阅读全文

posted @ 2017-04-17 13:37 阿兴的平凡世界 阅读(427) 评论(0) 推荐(0)

Qt 图片转Base64字符
摘要:QImage image(ImgPath); QByteArray ba; QBuffer buf(&ba); image.save(&buf, "PNG", 20); QByteArray hexed = ba.toBase64(); QString str = QString::fromLoca 阅读全文

posted @ 2017-01-19 15:46 阿兴的平凡世界 阅读(1213) 评论(0) 推荐(0)

异常:vs 中的qt error LNK2001: 无法解析的外部符号 Qt的moc机制 ( “staticMetaObject”等函数: 不是“****”的成员)
摘要:情况一:使用信号与槽你没有引入Q_OBJECT这个宏 情况二:引入了Q_OBJECT这个宏但是你继承的类或者自定义的类确实没用“staticMetaObject”等函数,这时需要多继承,多继承一个QObject,记住先后顺序,先继承QObject再继承你需要使用的类 阅读全文

posted @ 2016-12-20 11:00 阿兴的平凡世界 阅读(799) 评论(0) 推荐(0)

单独使用QQ截图插件
摘要:邮箱截图插件TXGYMailCamera.dll(X86)Export:CameraWindowCameraSubAreaCameraWindowLikeSpy调用参数:rundll32 TXGYMailCamera.dll CameraWindow微信截图插件PrScrn.dll(X86)Expo 阅读全文

posted @ 2016-12-19 11:14 阿兴的平凡世界 阅读(1313) 评论(0) 推荐(1)

导航