<?xml version="1.0" encoding="gbk"?>
<rss version="2.0">
  <channel>
    <title>firemail - 基础</title>
    <link>http://firemail.wang:8088/forum.php?mod=forumdisplay&amp;fid=239</link>
    <description>Latest 20 threads of 基础</description>
    <copyright>Copyright(C) firemail</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Thu, 28 May 2026 19:03:57 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>http://firemail.wang:8088/static/image/common/logo_88_31.gif</url>
      <title>firemail</title>
      <link>http://firemail.wang:8088/</link>
    </image>
    <item>
      <title>Qt发包 打包 依赖</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10794</link>
      <description><![CDATA[[*]C:\\Qt\\Qt5.4.2\\5.4\\msvc2013_64\\bin\\windeployqt.exe myexe.exe


打开QT命令行窗口
进入exe所在目录运行上面命令]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Sat, 19 Aug 2023 13:16:14 +0000</pubDate>
    </item>
    <item>
      <title>QString与std::wstring的转换问题</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10766</link>
      <description><![CDATA[问题描述：

在qt工程中调用QString::fromStdWString()时，老是报错error LNK2019: 无法解析的外部符号...QString::fromStdWString(...)...

原因：

在Qt库中 wchar_t 不是内置类型，所以QT建议我们构建基于Qt的软件时，也不要将wchar_t作为内置类型。但是在一些 ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Fri, 30 Jun 2023 06:24:49 +0000</pubDate>
    </item>
    <item>
      <title>Log4cpp多线程崩溃</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10735</link>
      <description><![CDATA[log4cpp使用多线程运行几分钟后出现崩溃，网上查找资料，找到解决办法，记录下

void OstreamAppender::_append(const LoggingEvent&amp; event) {
        (*_stream) good()) {
            // XXX help! help!
        }
}
 上图标记位置为崩溃地方，源文件为Ostr ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Mon, 22 May 2023 11:42:08 +0000</pubDate>
    </item>
    <item>
      <title>QWaitCondition</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10418</link>
      <description><![CDATA[class BASE_API ProduceQueue
{
    friend class Producer;
    friend class Consumer;

public:
]]></description>
      <category>基础</category>
      <author>Qter</author>
<enclosure url="/forum/~ProduceQueue();

" length="// 返回所有等待处理的Id
" type="image/jpeg" />      <pubDate>Fri, 10 Dec 2021 05:56:06 +0000</pubDate>
    </item>
    <item>
      <title>一段代码让程序崩溃</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10347</link>
      <description><![CDATA[int *p = nullptr;
        *p = 1;]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Wed, 16 Jun 2021 09:00:45 +0000</pubDate>
    </item>
    <item>
      <title>QWaitCondition 的正确使用方法</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10246</link>
      <description><![CDATA[简单用法QWaitCondition 用于多线程的同步，一个线程调用QWaitCondition::wait() 阻塞等待，直到另一个线程调用QWaitCondition::wake() 唤醒才继续往下执行。为了描述方便，这里假设主线程调用Send()往通信口发送一个数据包，然后阻塞等待回包才继续往下执行。另一个线 ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Tue, 29 Dec 2020 11:35:43 +0000</pubDate>
    </item>
    <item>
      <title>一些问题</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10228</link>
      <description><![CDATA[1.多线程访问网络，能用单例吗
2.网络函数recv会不会接受到不完整的报文（如一个报文被分成两次发送 ）]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Mon, 07 Dec 2020 08:49:53 +0000</pubDate>
    </item>
    <item>
      <title>基于Qt的线程安全退出</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10223</link>
      <description><![CDATA[https://blog.csdn.net/z1houcheng12/article/details/80595166

首先，QThread的用法有两种：（1）继承自QThread类：在自定义的线程类中通过使用m_isExist变量控制线程的退出。在外部调用退出线程时应该这样：首先调用退出线程接口，重置标识符的值；程序会阻塞再wai ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Thu, 03 Dec 2020 09:49:01 +0000</pubDate>
    </item>
    <item>
      <title>vector 排序方法sort的使用</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=10200</link>
      <description><![CDATA[https://www.cnblogs.com/tianyajuanke/archive/2012/05/24/2516881.html

使用vector的sort方法，有两种形式，一种是在类内部使用操作符重载实现，一种是在类外面写一个比较函数。但是sort方法无法直接传入其它形参，在需要动态排序相对某个人的位置时，采取了间接通 ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Wed, 28 Oct 2020 05:14:01 +0000</pubDate>
    </item>
    <item>
      <title>Qt 中，如何通过QAction::setData , 传送自定义的数据  Q_DECLARE_METATYPE</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9997</link>
      <description><![CDATA[https://www.cnblogs.com/stabber/archive/2012/12/07/2806787.html        [/backcolor]    最近，项目中有这样的需求，通过QAction::setData , 传送自定义的数据。在网上查了很多的资料，都是模模糊糊的说几句，都没有说到点子上，更有人给出了完全违背Qt理念的解决方 ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Tue, 17 Mar 2020 09:26:21 +0000</pubDate>
    </item>
    <item>
      <title>QVariant 存放指针</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9991</link>
      <description><![CDATA[QVariant v = QVariant::fromValue((void *) yourPointerHere);
yourPointer = (YourClass *) v.value();]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Thu, 12 Mar 2020 11:51:49 +0000</pubDate>
    </item>
    <item>
      <title>不能将“this”指针从“const ContactDelegate”转换为“ContactDelegate &amp;”</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9984</link>
      <description><![CDATA[严重性        代码        说明        项目        文件        行        禁止显示状态
错误        C2662        “void QFont::setPointSize(int)”: 不能将“this”指针从“const QFont”转换为“QFont &amp;”        


严重性        代码        说明         ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Tue, 10 Mar 2020 06:07:13 +0000</pubDate>
    </item>
    <item>
      <title>QVector对存储数据的释放</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9980</link>
      <description><![CDATA[文介绍使用Qt的QVector对存储数据的释放，包括存储自动变量指针变量两个方面。

一、QVector对自动变量的释放
QVector中的内建有内存管理，当 QVector生命周期结束，它的析构函数会把QVector中的元素销毁，并释放它们所占用的空间，所以用QVector一般不用显式释放 。 ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Tue, 10 Mar 2020 01:19:23 +0000</pubDate>
    </item>
    <item>
      <title>QT中的connect用法总结</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9977</link>
      <description><![CDATA[第一种

首先来看看老版本的 connect 写法，比较复杂些，需要将信号和槽进行明确的指定，包括形参。 
看一个示例：为方便演示，先自定义一个 Button，然后定义两个重载的信号lass MyButton : public QWidget
{
    Q_OBJECT
public:
    explicit MyButton(QWidg ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Sun, 08 Mar 2020 12:38:25 +0000</pubDate>
    </item>
    <item>
      <title>字符 字符集 字符串 编码 转换</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9927</link>
      <description><![CDATA[ASCII
ASCII-American Standard Code for Information Interchange
Character repertoire: 
ASCII 严格来讲就是7个bit大小的字符集，也就是code point介于0-127之间的字符集合。
7个字节表示的最大数：7bit=0b01111111=0x7f=127 最小数0 共有128个字符 ---标准ASCII ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Thu, 13 Feb 2020 09:12:54 +0000</pubDate>
    </item>
    <item>
      <title>Qt分享</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9903</link>
      <description><![CDATA[其中信号和槽，还有Qt的内存管理，我觉得是掌握Qt的关键，这也是它在技术方面区别与其他c++框架的2个特点。
   Qt是完全组件式编程的，也就是说它把我们常用到的功能模块编成动态库了，我们可以按需要分别去引用，而不用担心会把Qt整个框架加进来。比如，你要用Qt写个f ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Thu, 30 Jan 2020 11:52:40 +0000</pubDate>
    </item>
    <item>
      <title>QT学习笔记</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9852</link>
      <description><![CDATA[Qt学习之路(1)：前言C++的GUI编程同Java不同：GUI并不是C++标准的一部分。所以，如果使用Java，那么你最好的选择就是AWT/Swing，或者也可以使SWT/JFace，但是，C++的GUI编程给了你更多的选择：wxWidget, gtk++以及Qt。这几个库我都有接触，但是接触都不是很多，只能靠一 ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Sun, 05 Jan 2020 12:35:16 +0000</pubDate>
    </item>
    <item>
      <title>Qt之线程（QThread）</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9310</link>
      <description><![CDATA[QThread类提供了一个平台无关的方式来管理线程。 [/backcolor]
  一个QThread对象在程序控制中管理一个线程。线程在run()中开始执行。默认情况下，run()通过调用exec()启动事件循环并在线程里运行一个Qt的事件循环。 [/backcolor]
  可以使用worker-object通过QObje ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Sun, 25 Feb 2018 07:25:12 +0000</pubDate>
    </item>
    <item>
      <title>QT生成的exe自动拷贝依赖的dll并打包的方法</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9307</link>
      <description><![CDATA[QT生产的exe依赖很多dll，如何找出这些依赖并拷贝出来呢，最简洁的方法是：用QT自带的windeployqt.exe工具运行需要处理的exe即可，写个bat批处理喽：双击运行后，依赖的dll就自动拷贝到exe所在目录下了。

文件打包嘛，用Enigma Virtual Box这款软件，分分钟搞定。
h ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Sat, 24 Feb 2018 06:53:11 +0000</pubDate>
    </item>
    <item>
      <title>Log4Qt 使用笔记</title>
      <link>http://firemail.wang:8088/forum.php?mod=viewthread&amp;tid=9306</link>
      <description><![CDATA[http://blog.csdn.net/dbzhang800/article/details/6916948

Log4QtLog4Qt 是Apache Log4J 的Qt移植版，所以看Log4J的资料应该是最直接有效的(因为Log4Qt的直接资料太少了)。Log4Qt主要是用来记录日志(有助于程序调试)。有3个主要的组件：Logger提供日志记录服务，可 ...]]></description>
      <category>基础</category>
      <author>Qter</author>
      <pubDate>Sat, 24 Feb 2018 06:09:27 +0000</pubDate>
    </item>
  </channel>
</rss>