![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
qt
文章平均质量分 55
偶是江湖中人
这个作者很懒,什么都没留下…
展开
-
qt5在vs2017中的设置
项目使用vs2017来编译。有几个地方要设置下中添加一个ui文件,右键这个ui文件,选择属性,项类型选择自定义生成工具这时候左侧会生成自定义生成工具选项命令行中输入"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"说明输入Uic%27ing %(Identity)...输出.\GeneratedFiles\ui_%(Filename).h;%(Outputs)$(Q原创 2022-04-29 16:49:59 · 1235 阅读 · 0 评论 -
qt每天生成一个日志文件
好的日志需要记录详细的时间,不同的运用就生成不现的日志名。另外日志比较大,一般是一天生成一个。参考了其它博主的代码。最终代码实现如下//日志void outputMessage(QtMsgType t, const QMessageLogContext &context, const QString &msg){ static QMutex mutex; mutex.lock(); QString text; switch(int(t)) {原创 2022-04-21 07:47:03 · 538 阅读 · 0 评论 -
连接driver not loaded解决方法
我想你和我一样,照着终于编译好了qt的oracle驱动QOCI,连接成功!!! 一文编译了QOCI,我目前遇到下面错误:(代码我直接用原文的)QSqlDatabase: QOCI driver not loadedQSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7error_Oracle: "Driver not loaded Driver not loaded" 解决这..转载 2022-03-15 17:37:29 · 2936 阅读 · 0 评论 -
How to use Windows API in Qt (A simple example)
Qt is a cross-platform framework that encapsulates API across many Operating Systems but one always faces situations in which he/she needs to access and use OS specific capabilities. Windows API is a massive collection of interfaces that allow a programmer原创 2022-03-08 10:06:30 · 80 阅读 · 0 评论 -
How to create a library with Qt and use it in an application
IntroductionThis tutorial illustrates different approaches for using a custom library in your application on Windows. The first part explains how to create a shared library and how to link against it in your application. The second part is about creating原创 2022-03-07 17:01:04 · 772 阅读 · 0 评论 -
qt单例实例模板
经常需要使用单例,这里写一个直接看代码#define DECLARE_SINGLETON(Class) \Q_DISABLE_COPY(Class) \public: \ static Class* Instance() \ { \ static QMutex mutex; \ static QScopedPointer<Class> inst; \ if (Q_UNLIKELY(!inst)) { \原创 2022-03-03 08:56:40 · 337 阅读 · 0 评论 -
qt中socket中错误获取的方法
qt5.15之前是使用QAbstractSocket::error5.5版本以后就可以使用 errorOccurred 了,这时就可以使用 connect愉快的绑定了connect(this,&QIODevice::readyRead,this,&ClientSocket::slotReadData); connect(this,&QAbstractSocket::disconnected,this,&ClientSocket::slotDisconnect原创 2022-01-23 17:14:04 · 1836 阅读 · 0 评论