摘要: cd /etc/udev/rules.d sudo vim xxx.rules /*写入*/ ACTION=="add", SUBSYSTEMS=="block", SUBSYSTEM=="block", KERNEL=="sd[a-z][0-9]", RUN{program}+="/bin/mkd 阅读全文
posted @ 2024-06-14 16:53 乐吴 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 问题: 在使用 ui->listWidget->setCurrentRow(row); 设置当前行之后 listWidget 的选中状态未发生改变. 解决: 在设置当前行之后再次设置焦点 ui->listWidget->setFocus(); 阅读全文
posted @ 2024-06-12 14:54 乐吴 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1: vi ~/.xsessionrc #!/bin/bash cd /opt/xxx/xxx/xxx/xxx/build/ ./myQt.exe& 2: vim ~/.config/autostart/xxx.desktop写入[Desktop Entry] Version=1.0 Name=de 阅读全文
posted @ 2024-06-07 10:41 乐吴 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 问题: 在Ubuntu下使用QFileDialog文件对话框选择一个路径时该对话框显示为黑色且不显示文件名称。 解决方法: 在main函数中加入该代码后解决(可能对自己写的样式表造成影响) QApplication::setStyle(QStyleFactory::create("Fusion")) 阅读全文
posted @ 2024-06-04 14:19 乐吴 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 问题: 在VS2017中打开.pro文件报错 < Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set > 问题及解决方法: 在.pro目录下已经生成了MINGW编译器编译出的文件,删除.pro目录下自动生成的文件即可 阅读全文
posted @ 2024-05-11 14:18 乐吴 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 问题: 在VS2017中配置完了Qt visual studio tools插件后,编译时报错< MSB410 在条件(%(Name)' == InputFile' OR %(Name)' == OutputFile > 原因及解决方法: 插件版本问题,先卸载最新版,下载旧版:https://dow 阅读全文
posted @ 2024-05-11 14:15 乐吴 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 在ubuntu下使用QXlsx库时报错,原因是找不到qzipwriter_p.h文件,在ubuntu下使用apt安装的qt creator并未自动安装qtbase5-private-dev库。 使用 sudo apt-get install qtbase5-private-dev安装后再次编译通过。 阅读全文
posted @ 2024-05-09 10:37 乐吴 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 问题: 1 void MainWindow::on_tableview_clicked(const QModelIndex& index) 2 { 3 item = new QStandardItem("clicked"); 4 //ui->plant_table->data() 5 item->s 阅读全文
posted @ 2024-05-08 10:12 乐吴 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 问题: QFile 中的 readLine() 在读取数据时会读到换行符,不利于数据解析。 解决方法: file.readLine().trimmed(); //即可去除行尾换行符空格等。 阅读全文
posted @ 2024-05-07 15:34 乐吴 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 问题: 1 QPixmap MainWindow::opencvToQImage(const QString &str) 2 { 3 cv::Mat cvImage = cv::imread(str.toStdString(),cv::IMREAD_REDUCED_COLOR_2); 4 cv::M 阅读全文
posted @ 2024-05-07 08:50 乐吴 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 描述: 在ubuntu(ARM64)下执行qmake出现错误:Project ERROR: Unknown module(s) in QT: serialport charts 原因: 在.pro中引用了serialport与charts模块但未找到相应的库。 解决方法: sudo apt upda 阅读全文
posted @ 2024-04-19 16:08 乐吴 阅读(307) 评论(0) 推荐(0) 编辑
摘要: void sampleDete::isDirExist(const QString &path) { qDebug()<<"path: "<<path; //"./images/2024-04-15-08-56-18/2024-04-15-08-56-18_1" QDir dir(path); if 阅读全文
posted @ 2024-04-15 09:57 乐吴 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 样式表: QPushButton { padding-left: 2px; padding-right: 10px; border-radius: 3px; color:rgba(54, 143, 205, 1); border: 2px solid rgba(54, 143, 205, 1); b 阅读全文
posted @ 2024-04-13 15:35 乐吴 阅读(31) 评论(0) 推荐(0) 编辑
摘要: QT报错: :-1: error: [Makefile.Debug:1234: debug/moc_serialportthread.cpp] Error 1 原因: 使用了Q_OBJECT,却未继承元对象系统基类解决:直接或间接继承QObject类 class serialPortThread : 阅读全文
posted @ 2024-04-09 15:16 乐吴 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 错误信息: /usr/bin/ld: rknnthread.o: in function `rknnThread::~rknnThread()':***/rknnthread.cpp:14: multiple definition of `rknnThread::~rknnThread()'; rk 阅读全文
posted @ 2024-04-08 15:18 乐吴 阅读(13) 评论(0) 推荐(0) 编辑