Akash Agarwal
Akash Agarwal

Reputation: 2530

Qt Creator open ui.qml file in editor by default

In Qt creator whenever you open a ui.qml file by double clicking or CTRL + TAB the file normally opens in design mode. To see the code, you need to hit ESC to go the text editor. I want that the ui.qml files should open by default in the editor. How can I do that in settings?

Upvotes: 5

Views: 2386

Answers (2)

rubenvb
rubenvb

Reputation: 76775

If you want to edit .ui.qml files by hand, don't use .ui.qml files? These are made to be edited by the designer and are limited to a small subset of QML because of that. Just use the normal .qml extension in this case.

More info on QML UI files here.

Upvotes: 5

Shtol Krakov
Shtol Krakov

Reputation: 1280

In Qt Creator:

  1. Tools >>> Options;
  2. Open Environment;
  3. Go to MIME Types;
  4. Find (by filter, for ex.) application/x-qt.ui+qml;
  5. Delete or change Pattern field in Details.

Upvotes: 7

Related Questions