Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator open ui.qml file in editor by default

Tags:

qt

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?

like image 928
Akash Agarwal Avatar asked May 29 '16 10:05

Akash Agarwal


2 Answers

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.
like image 150
Shtol Krakov Avatar answered Sep 23 '22 06:09

Shtol Krakov


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.

like image 44
rubenvb Avatar answered Sep 20 '22 06:09

rubenvb