使用Qt Creator打造Python IDE

当前Qt Creator已经允许建立Python文件了。我们可以使用Qt Creator当做Python的编辑器,支持高亮显示。但是不支持其他一些高级特性,比如自动填词功能。

运行Python script需要一些配置。打开Qt Creator,然后Tools->Options->Environment->External Tools。点击Add->Add category,新建一个category(例如Python)。然后再新建的category上Add->Add Tools,例如runpy。再做如下配置:

  1. Description -- 你想写什么都行
  2. Executable -- 填入Python.exe的路径
  3. Argument -- %{CurrentDocument:FilePath}
  4. Working directory -- %{CurrentDocument:Path}



运行Python script:

Tools->External->python->runpy


哦,了,Enjoy!!!

你可能感兴趣的:(使用Qt Creator打造Python IDE)