Skip to content

Chinese

A forum for those speaking Chinese
710 Topics 1.8k Posts
  • 0 Votes
    2 Posts
    1k Views
    J
    ok it resolved by using this QuickQanava library
  • QT SDK安裝

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    FlotisableF
    現在安裝 Qt 要到這裡
  • 有關 QThread 多次執行程式

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    ytexasY
    @LeonSu said in 有關 QThread 多次執行程式: connect(dowork, SIGNAL(finish()), thread, SLOT(deleteLater())); Hi~ 其实本可以多次点击start,多次执行,但是问题在于dosomething()中的发出的finish信号触发了thread.deleteLater(),导致thread销毁. 即 connect(dowork, SIGNAL(finish()), thread, SLOT(deleteLater())); 建议在MainWindow关闭时,再释放thread. 另一种方法则是在点击开始时,再创建一个thread,并重新链接信号与槽. 以上,希望能帮助到您 :D
  • 在生产环境的APP 怎样输出运行错误信息。

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    neemeN
    [image: 620e6436-f87a-4a2f-8e5b-6e52a2f5a882.png]
  • QT5.9串口接受的内容不对

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    No one has replied
  • 1 Votes
    2 Posts
    3k Views
    jiancaiyangJ
    @Angelking 恰好我也在做这方面的研究。 我的需求是,为我们的动作编辑器增添Direct3D的支持,因为用户更加习惯MME----这是一个基于HLSL的渲染框架。 这里问题在于我们使用的是Qt Quick,而现有的代码是和OpenGL深度绑定的,我们需要做的是考察哪些地方和OpenGL深度绑定的,然后尝试抽象出来,做好做成一个插件,我是考察Qt插件的写法决定将OpenGL相关的内容放在插件里实现。 想让Qt Quick应用和OpenGL和Direct3D解耦,我想一个方法就是使用RTT技术。就是采用不同的渲染器在一个纹理图上渲染,这样有可能通用。但是其中的难点感觉还是挺多的,现在在艰难地攻克。
  • win qt5程序开机自启动执行结果 与 双击运行执行结果 不一样

    Unsolved
    2
    1 Votes
    2 Posts
    1k Views
    Q
    感谢 @shasidaran大神 提出的解决方案 这样exe是靠相对路径寻找文件的。你双击时,exe与dat在同一个工作目录,所以正确执行。 而自动运行时,exe的工作目录是c:\windows\system32,与dat不在一个工作目录下,所以文件找不到。 所以你要用绝对路径寻找dat文件
  • Virtual Keyboard - Handwriting support for Chinese

    Unsolved
    1
    0 Votes
    1 Posts
    600 Views
    No one has replied
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • 关于Qt调试的问题,如何高效调试

    Locked Unsolved
    2
    0 Votes
    2 Posts
    3k Views
    A
    Duplicate of https://forum.qt.io/topic/90607/list-index-out-of-range问题如何解决. Locking. Also I gave you the answer in your english thread here: https://forum.qt.io/topic/90608/how-to-find-the-source-of-problem-qlist-t-at-index-out-of-range
  • List index out of range问题如何解决

    Unsolved
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 关于QChart中坐标轴对齐的问题求助

    Unsolved
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 使用QWebEnginView时怎么阻止加载页面时闪屏

    Unsolved
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • qmake的HEADERS后面必须填头文件的完整路径吗?

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    JKSHJ
    @helloxkcd said in qmake的HEADERS后面必须填头文件的完整路径吗?: 我试着填了HEADERS += stdio.h,可是报错了 HEADERS 适用于您自己的源码。 stdio.h 不是来自您的项目,所以您应该在您的 .cpp 源文件中编写 #include <cstdio> 或 #include <stdio.h>。
  • 请问qtcreator如何默认使用kde的console?

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    H
    原来是这样...... http://blog.csdn.net/sunleiailiumin/article/details/23936439
  • 0 Votes
    2 Posts
    2k Views
    R
    信号与槽的连接 for(int i = 0; i < charts_list_->count(); i++){ connect(charts_list_->at(i)->series2_,SIGNAL(clicked(QPointF)),this,SLOT(series2HandleClickedPoint(QPointF))); } 槽函数 void View::series2HandleClickedPoint(const QPointF &point){ PulseGraphOperator::UnSelectPointInAllCharts(charts_list_, point.x()); } UnSelectPointInAllCharts()方法是为了多个图同步进行反选 void PulseGraphOperator::UnSelectPointInAllCharts(QList<Chart *> *list, qreal xpos){ for(int i = 0; i < list->count(); i++){ PulseGraphOperator::UnSelectPoint(list->at(i), xpos); } } UnSelectPoint()方法实现反选,将反选的点从已选中序列series2中移除,添加到原序列series1 void PulseGraphOperator::UnSelectPoint(Chart* chart, qreal xpos){ QPointF clicked_point; if(chart->series2_->points().size() > 1){ foreach(QPointF series2_point, chart->series2_->points()){ if(series2_point.x() == xpos){ clicked_point = series2_point; break; } } chart->series1_->append(clicked_point); chart->series2_->remove(clicked_point); qDebug()<<"series2.point > 1"; }else{ chart->series1_->append(chart->series2_->points()); chart->series2_->clear(); qDebug()<<"series2.point = 1"; } qDebug()<<"UnSelect point"; } 无奈出现空指针异常,读取或者访问冲突,不知道问题出在哪里?
  • Linux 4k分辨率下,创建多个openglwidget,会被系统kill掉。

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    jiancaiyangJ
    可以呀,使用Qt Quick就可以完成你想要的效果,而且可以和OpenGL很好地整合起来。我目前做的产品,也就是基于这个思路。
  • 应用软件,只允许运行一次

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    E
    m_bFirst = true; QString serverName = QCoreApplication::applicationName(); QLocalSocket socket; socket.connectToServer(serverName); if (socket.waitForConnected(500)) { m_bFirst = false; }else{ m_localServer = new QLocalServer(this); if (!m_localServer->listen(serverName)) { if (m_localServer->serverError() == QAbstractSocket::AddressInUseError && QFile::exists(m_localServer->serverName())) { QFile::remove(m_localServer->serverName()); m_localServer->listen(serverName); } } } m_bFirst为false,表示已经存在。 你可以试试先
  • 扩展窗口创建的问题

    Unsolved
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • invokeMethod 的使用

    Unsolved
    2
    0 Votes
    2 Posts
    3k Views
    JKSHJ
    @Tegan 如果 func2 无返回值,那么您不应该使用 Q_RETURN_ARG。 请阅读 https://doc.qt.io/qt-5/qmetaobject.html#invokeMethod QString text = "Hello"; QMetaObject::invokeMethod(&myobj, "func2", Q_ARG(QString, text)); 从Qt 5.10开始,您也可以使用: // Function pointer QString msg; QMetaObject::invokeMethod(&myobj, &MyClass::func, &msg); qDebug() << "Return value:" << msg; // Lambda QMetaObject::invokeMethod(&myobj, [&myObj] { myObj.func2("Hello"); });