
Qt
风中飘零的bug
这个作者很懒,什么都没留下…
展开
-
Qt字符串分割
Qt字符串分割方式根据QT官方助手描述如下两种方法:QString QString::section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) constThis function returns a section of the string.This string is trea...原创 2019-01-23 22:10:18 · 2948 阅读 · 0 评论 -
Qt插件接口相关的两个重要宏
Q_INTERFACES(...)在实现插件时使用:用于声明该类所实现的接口,且这些接口必须使用了Q_DECLARE_INTERFACE进行了声明。Example:class BasicToolsPlugin : public QObject, public BrushInterface, ...翻译 2019-01-25 21:30:30 · 1808 阅读 · 0 评论 -
QString转char*、string、const char*
QString转char*QString a = "test";QByteArray ba;ba = a.toLatin1();char * ch = ba.data();该过程可以完成QString到char*的转换,但是不能写成char * ch = a.toLatin1().data(),这是因为QByteArray::data()的返回值是存在于QByteArray中的,也...原创 2019-02-23 15:46:46 · 2670 阅读 · 0 评论