Erik Brendel
Erik Brendel

Reputation: 714

Edit ui files with CLion

I am developing a QT application in C++. Since i like CLion, I would like to use this IDE to write my code. My problem: I cannot open the .ui - files. CLion just ignores my double-click on the files. I do not want a graphical editor like in QT creator, editing the XML as text would be perfectly fine.

How can I tell CLion, that it should open *.ui - files as xml?

Upvotes: 11

Views: 4448

Answers (4)

Mahadev Kurkundi
Mahadev Kurkundi

Reputation: 1

Right click on any *.ui file. From context menu , select "Open with..." and browse for QT editor. View attached image for reference

Upvotes: 0

uta
uta

Reputation: 2069

You can associate the file with the XML editor from context menu enter image description here

Upvotes: 2

Vladimir Brodovy
Vladimir Brodovy

Reputation: 21

Go to Settings / Preferences | Editor | File Types, select Qt UI Designer Form from the Recognized File Types list, and delete the associated file extension.

Next time you click a .ui file for opening, set the Open in associated application checkbox, and the files of this type will always open in Qt Designer.

See also:
https://www.jetbrains.com/help/clion/qt-tutorial.html#edit-ui

Upvotes: 2

xander
xander

Reputation: 1765

You can go to Settings -> Editor -> File Types and choose XML to add *.ui files below.

What you can also do is register an external tool to edit the UI files with the Qt UI Designer: https://www.jetbrains.com/help/clion/external-tools.html

Upvotes: 11

Related Questions