Qt
hkNaruto
这个作者很懒,什么都没留下…
展开
-
qDebug 没有输出
修改运行环境变量原创 2021-10-15 11:39:22 · 1054 阅读 · 0 评论 -
Qt QTimer 控制 QEventLoop超时 实现http请求超时处理
QString HttpUtil::get(const QUrl url){ qDebug() << url; QNetworkAccessManager net; QNetworkRequest request(url); QNetworkReply *reply = net.get(request); // 添加消息循环机制... QEventLoop eventloop; connect(reply, SIGNAL(finish.原创 2021-08-24 09:07:52 · 2207 阅读 · 1 评论 -
Qt warning: use of old-style cast
原代码qint64 r = udpSocket.readDatagram(buff, 1024, &addr, &port);QString msg = QString::fromUtf8(buff, (int)r);解决方法,采用static_castqint64 r = udpSocket.readDatagram(buff, 1024, &addr, &port);QString msg = QString::fromUtf8(buff, stati原创 2021-08-16 11:39:29 · 2541 阅读 · 1 评论 -
QUdpSocket 获取远程ip地址及端口
void UdpSample::onReadyRead(){ QHostAddress addr; quint16 port; char buff[1024]; qint64 r = udpSocket.readDatagram(buff, 1024, &addr, &port); qDebug() << r; QString msg = QString::fromUtf8(buff); qDebug() <&l.原创 2021-08-16 11:32:19 · 2903 阅读 · 0 评论 -
QObject: Cannot create children for a parent that is in a different thread
故障程序#include "mythread.h"#include <QDebug>MyThread::MyThread(QThread *parent) : QThread(parent){ ce = new CommandExecutor("ls /"); connect(ce, SIGNAL(finishedEvent()), this, SLOT(onFinished()));}void MyThread::run(){ qDebug()原创 2021-08-10 15:25:45 · 297 阅读 · 0 评论 -
Feature ‘openssl-linked‘ was enabled, but the pre-condition ‘!features.securetransport && !features.
./configure -static -static-runtime -openssl-linkedNote: Also available for Linux: linux-clang linux-iccNote: Using static linking will disable the use of dynamicallyloaded plugins. Make sure to import all needed static plugins,or compile needed mo.原创 2021-03-19 11:20:44 · 5132 阅读 · 0 评论 -
银河麒麟桌面系统V10 arm64 编译开源截屏工具报错 对‘ScreenShoter::SNIPPED(QPixmap, QPoint const&)’未定义的引用
源码地址:https://github.com/hknarutofk/Capturer出错版本:e05aec82b8b27dd20aa110a4a05554703d02ba08错误内容g++ -Wl,-O1 -Wl,-rpath-link,/usr/lib/aarch64-linux-gnu -o Capturer qxtglobalshortcut.o qxtglobalshortcut_x11.o main.o capturer.o colorpanel.o textedit.o bu原创 2020-12-16 15:40:17 · 838 阅读 · 0 评论 -
Qt QGraphicsView 背景透明设置
编辑样式background: transparent;border:0px参考:原创 2020-07-02 13:59:23 · 3478 阅读 · 0 评论