惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
博客园_首页
雷峰网
雷峰网
V
V2EX
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
T
Tailwind CSS Blog
小众软件
小众软件
博客园 - 叶小钗
美团技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
MyScale Blog
MyScale Blog
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

Qt

撸了一个面向 Qt Widgets 的 Fluent 风格组件库 请问一下大家用 ai 做 qt 应用的时候有什么 skill 或者方法改进 ui 吗? 请教几个 qt6, macos 打包遇到依赖问题。 新建一个 qt 项目,运行时,底下应用程序输出 1127, FromFilemap Qt5 托盘菜单右击时的异常 有没有什么工具可以美化 qt 界面的? Qt 有什么不错的第三方控件库吗? 寻求帮助!在 qt creator 里面创建 quick 项目失败,找不到原因。 关于 QT 中通过信号与槽的方式启动子线程的问题。 寻找一起开发这个开源项目的人, qt c++的,信息收藏、Kindle/微信读书/豆瓣阅读笔记管理 使用 Qt 做的软件界面太丑怎么办?有没有什么美工插件或者入门教程 有哪位大佬对修改 3DSlicer 或者开发插件有经验? 如何正确安装 QT? 请教 qt svg 打包后无法显示问题。 如何在 QT 中的多个级别的窗口之间传输消息 关于 QT(C++)通过继承 QObject 的方法实现多线程,子线程调用失效。 在 Qt 中控件同时使用智能指针和父子关系,会有二次删除风险吗? qt5 中文乱码问题怎么解决? 现在写 Qt 的主流 IDE 工具是什么? 请问多线程之间是如何协调配合的? QSerialPort 如何实现同一个串口设备命令做出不同操作? qt creator 插件开发问题请教 求助一个读硬盘序列号的问题 关于 Qt6.6.0 无法设置程序图标的问题 求助,如何编译 openwrt 的时候加入 qt6 为什么 Qt Creator 界面如此丑陋 大家了解 Qt 和 qt-creator 的开源协议吗?基于它,可以写闭源商用的软件吗? 求助,使用 CLion 开发 Qt,创建了 UI 类不会使用 mac 下的 Qt/C++应用,通过 url scheme 唤起时,如何获取到唤起的链接? Qt 中的 `QFontMetrics.boundingRect()` 算出来的文本长度有时候会不对,应该如何处理。
qt 新手求助: No documents matching 'ui_mainwindow.h' cou...
minecraftyusei · 2025-07-03 · via Qt

新手上路,整了一个非常单纯的小工程(拿 ai 写的),然后在 ui 设计时右键 Pushbutton 转到槽时被这个问题干碎了,一头雾水,甚至不知道怎么排除错误。

编译日志如下: 00:46:54: 为项目 untitled1 执行步骤 ... 00:46:54: 正在启动 "G:\QtCommunity\Tools\CMake_64\bin\cmake.exe" --build G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug --target all

[0/2 0.0/sec] Re-checking globbed directories... [1/9 0.4/sec] Automatic MOC and UIC for target untitled1 [2/9 0.7/sec] Running AUTOMOC file extraction for target untitled1 [3/9 0.9/sec] Running moc --collect-json for target untitled1 [4/9 0.6/sec] Building CXX object CMakeFiles/untitled1.dir/untitled1_autogen/mocs_compilation.cpp.o [5/9 0.8/sec] Building CXX object CMakeFiles/untitled1.dir/main.cpp.o [6/9 0.9/sec] Building CXX object CMakeFiles/untitled1.dir/mainwindow.cpp.o [7/9 0.9/sec] Linking CXX shared module libuntitled1_arm64-v8a.so [8/9 1.0/sec] Copying untitled1 binary to apk folder 00:47:03: The command "G:\QtCommunity\Tools\CMake_64\bin\cmake.exe --build G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug --target all" finished successfully. 00:47:03: 正在启动 "G:\QtCommunity\6.9.1\mingw_64\bin\androiddeployqt.exe" --input G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-untitled1-deployment-settings.json --output G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-untitled1 --android-platform android-35 --jdk G:/jdk17 --gradle

Generating Android Package Input file: G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-untitled1-deployment-settings.json Output directory: G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-untitled1/ Application binary: untitled1 Android build platform: android-35 Install to device: No Skipping createRCC Starting a Gradle Daemon, 1 incompatible and 9 stopped Daemons could not be reused, use --status for details

Task :preBuild UP-TO-DATE Task :preDebugBuild UP-TO-DATE Task :mergeDebugNativeDebugMetadata NO-SOURCE Task :javaPreCompileDebug Task :generateDebugResValues Task :checkDebugAarMetadata Task :mapDebugSourceSetPaths Task :generateDebugResources Task :mergeDebugResources Task :packageDebugResources Task :createDebugCompatibleScreenManifests Task :extractDeepLinksDebug Task :parseDebugLocalResources

Task :processDebugMainManifest package="org.qtproject.example.untitled1" found in source AndroidManifest.xml: G:\Qtfile\QtProgram\untitled1\build\Qt_6_9_1_Clang_arm64_v8a-Debug\android-build-untitled1\AndroidManifest.xml. Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored. Recommendation: remove package="org.qtproject.example.untitled1" from the source AndroidManifest.xml: G:\Qtfile\QtProgram\untitled1\build\Qt_6_9_1_Clang_arm64_v8a-Debug\android-build-untitled1\AndroidManifest.xml.

Task :processDebugManifest Task :mergeDebugShaders Task :compileDebugShaders NO-SOURCE Task :generateDebugAssets UP-TO-DATE Task :mergeDebugAssets Task :compressDebugAssets Task :processDebugJavaRes NO-SOURCE Task :checkDebugDuplicateClasses Task :mergeDebugJniLibFolders Task :mergeLibDexDebug Task :validateSigningDebug Task :writeDebugAppMetadata Task :writeDebugSigningConfigVersions Task :processDebugManifestForPackage Task :mergeDebugNativeLibs Task :mergeDebugJavaResource Task :processDebugResources Task :compileDebugJavaWithJavac Task :dexBuilderDebug Task :desugarDebugFileDependencies Task :mergeProjectDexDebug Task :stripDebugDebugSymbols Task :mergeExtDexDebug Task :packageDebug Task :createDebugApkListingFileRedirect Task :assembleDebug

[Incubating] Problems report is available at: file:///G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-untitled1/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.12/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 23s 33 actionable tasks: 33 executed Android package built successfully in 28.935 ms. -- File: G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-untitled1//build/outputs/apk/debug/android-build-untitled1-debug.apk 00:47:32: The command "G:\QtCommunity\6.9.1\mingw_64\bin\androiddeployqt.exe --input G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-untitled1-deployment-settings.json --output G:/Qtfile/QtProgram/untitled1/build/Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-untitled1 --android-platform android-35 --jdk G:/jdk17 --gradle --gdbserver" finished successfully. 00:47:32: Elapsed time: 00:38.

mainwindow.h 如下: #ifndef MAINWINDOW_H #define MAINWINDOW_H

#include <QMainWindow> #include <QLabel>

class MainWindow : public QMainWindow { Q_OBJECT

public: MainWindow(QWidget *parent = nullptr); ~MainWindow();

protected: void mousePressEvent(QMouseEvent *event) override;

private: QLabel *label; };

#endif // MAINWINDOW_H

mainwindow.cpp 如下: #include "mainwindow.h" #include <QMouseEvent> #include <QFont> #include <QDebug>

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { // 设置窗口大小 resize(400, 300);

// 创建 label 但先不显示文字
label = new QLabel(this);
label->setText("");
label->setAlignment(Qt::AlignCenter);
label->setGeometry(rect());  // 占满整个窗口
label->setFont(QFont("Arial", 24));

}

MainWindow::~MainWindow() { }

void MainWindow::mousePressEvent(QMouseEvent *event) { Q_UNUSED(event); label->setText("Hello World"); qDebug() << "屏幕被点击,显示 Hello World"; }