Qt 6.11 is out! See what's new in the release
blog
Qt Creator - streamline find current qml file usage?
-
Qt Creator v19, Windows 11
In my work, especially with existing code, I want to see where currently edited component is used.
Only repeatable solutions is to RMB on top bar on file name, choose Copy File Name, Ctrl+Shift+F, paste name and search.I couldn't find existing command to do it.
I tried with Lua ScriptT = require'TextEditor' local U = require 'Utils' local A = require 'Action' local Q = require 'Qt' local editor = T.currentEditor() if editor then local doc = editor:document() local filepath = doc:file() local fileName = filepath:fileName() local ext = string.sub(fileName,-3) local name = string.sub(fileName,1,-5) if ext == "qml" then Q.clipboard().text = name A.trigger("Find.Dialog") end endBut ... there's no action to trigger search and jump to results. I can ONLY open search pane and manually paste filename.
Are there other solutions that I'm missing?
Ctrl+Shift+Uon componentTomin any place of its usage shows all places of its usage. It could be extended to work from within Qml file.