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

Qt Creator中qmlformat自动添加--inplace选项致格式化失败求助

Qt Creator中qmlformat自动添加--inplace参数导致格式化失败

我在Qt Creator中使用qmlformat格式化QML文件,配置了以下选项:

  • 启用--normalize
  • 缩进宽度设为2(对应--indent-width 2)
  • 开启--objects-spacing
  • 开启--functions-spacing
  • 启用--force

但格式化时工具自动添加了--inplace参数,导致格式化失败,报错信息如下:

Error in text formatting: Failed to format: The command "/home/user/Qt/6.7.0/gcc_64/bin/qmlformat --normalize --indent-width 2 --objects-spacing --functions-spacing --force --inplace /tmp/QtCreator-iZOaRU/qtc_beautifier_kCRiQkSB.qml" terminated with exit code 1..

我翻遍了Qt Creator的设置项,都没找到这个--inplace参数是在哪里被自动添加的,谷歌搜索也没找到有效的解决方案。有没有人遇到过同样的问题?

内容的提问来源于stack exchange,提问作者Аркадий Гурбанов

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.22 05:17:04