系统相关
首页 > 系统相关> > xml – PyCharm 4不会在双击.ui文件时打开Qt Designer. (Linux)的

xml – PyCharm 4不会在双击.ui文件时打开Qt Designer. (Linux)的

作者:互联网

PyCharm和Qt Designer都已安装并正在运行. PyCharm将.ui文件显示为Qt设计器文件,但是当我点击它们或双击它们时没有任何反应.为了编辑它们,我必须右键单击 – >在Thunar [我在Xfce上]显示在打开的文件夹中,然后双击文件管理器中的文件,该文件管理器将在Qt Designer中打开它.

我没有在设置中看到任何更改此行为的选项.有关如何让Qt Designer从PyCharm启动的任何想法?

解决方法:

没有现成的解决方案,因为PyCharm似乎并不知道有问题的扩展类型(.ui),但我想使用Register New File Type Association Dialog就足以作为一种解决方法:

  • Open matching files in PyCharm

When this option is selected, PyCharm treats the type of the file to be opened as one of the recognized file types. Choose the relevant type from the list box below, that displays all the file types recognized by PyCharm.

  • File Pattern

In this text box, specify the file pattern to be associated with the selected file type. By default, the text box shows the following pattern: *.<current file full extension>.

  • Open matching files in associated application

When this option is selected, PyCharm attempts to open the selected file using its native application, if this application is available.

如果你愿意,你也可以查看this documention,但不可否认,用xml编辑器编辑ui文件虽然有可能,但并不理想!

To associate a file type with extensions

  • Open the File Types settings page.
  • From the Recognized File Types list, select the desired type.
  • In the Registered Patterns area, complete the list of patterns that define the file > extensions to indicate that the corresponding files belong to the selected type. Do one of the following:
  • To register a new pattern, click add (Alt+Insert) and enter the desired extension pattern in the Add Wildcard dialog box that opens.
  • To update a pattern, select it in the list, click the Edit button edit1 and make the necessary changes in the Edit Wildcard dialog box that opens.
  • To remove a pattern from the list, select it and click delete (Alt+Delete).

因此,您基本上可以将* .ui模式与XML相关联,因为UI文件实现为XML,无论好坏.

标签:linux,xml,pycharm,qt,qt-designer
来源: https://codeday.me/bug/20190703/1362044.html