You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu下Qt Creator项目无法生成翻译文件的问题求助

Qt Creator无法创建翻译文件问题

已执行操作

  • 在main.cpp、mainwindow.cpp和mainwindow.h中引入头文件:
    #include <QTranslator>
    
  • 在项目pro文件中配置翻译项:
    TRANSLATIONS = lang_en.ts
    

附加环境信息

  • 无法通过系统程序搜索启动Qt Creator,仅能从终端启动
  • 新建空项目后问题复现,但创建新项目时可正常添加翻译文件

lupdate执行反馈

  • 通过Qt Creator GUI执行lupdate时,输出:
    Starting external tool "/usr/lib/qt6/bin/lupdate /home/moritz/C++/Georechner.pro"
    
  • 在终端手动执行命令:
    lupdate -verbose ~/C++/GeoRechner/Georechner_aktuell/Georechner.pro
    
    得到警告:
    WARNING: Could not find qmake spec 'default'.
    
    且未生成预期的lang_en.ts文件,怀疑是Ubuntu 22.04系统中缺少Qt语言相关组件或配置异常。

内容的提问来源于stack exchange,提问作者MoritzMoreira

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 22:12:09