Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator - streamline find current qml file usage?
Qt 6.11 is out! See what's new in the release blog

Qt Creator - streamline find current qml file usage?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 51 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SebastianMS Offline
    SebastianMS Offline
    SebastianM
    wrote last edited by SebastianM
    #1

    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 Script

    T = 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
    end
    

    But ... 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+U on component Tom in any place of its usage shows all places of its usage. It could be extended to work from within Qml file.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved