Refactor code to:
- Improve internal quality of your application
- Improve performance and extensibility
- Improve code readability and maintainability
- Simplify code structure
Qt Design Studio allows you to quickly and conveniently apply actions to refactor your code by selecting them in a context menu. For more information, see Applying Refactoring Actions.
To find instances of a specific QML type in a project, place the cursor on the type and select Tools > QML/JS > Find References to Symbol Under Cursor or press Ctrl+Shift+U.
Qt Design Studio searches from the following locations:
- Files listed as a part of the project
- Files directly used by the project files (for example, generated files)
The Search Results pane shows the location and number of search hits in the current project.
You can browse the search results in the following ways:
- To go directly to an instance, double-click the instance in the Search Results pane.
- To move between instances, click the (Next Item) button and (Previous Item) button in the Search Results pane.
- To expand and collapse the list of all instances, click the (Expand All) button.
- To filter the search results for the usage of symbols according to access type, such as read, write, or declaration, click the (Filter Tree) button and select the access type.
- To clear the search results, click the (Clear) button.
- To start a new search, click the (New Search) button.
You can rename symbols in all files in a project. To rename a QML type in a project, select Tools > QML/JS > Rename Symbol Under Cursor or press Ctrl+Shift+R.
The Search Results pane shows the location and number of instances of the symbol in the current project.
To replace all selected instances, enter the name of the new symbol in the Replace with text box, and select Replace. To omit an instance, deselect the check box next to the instance.
Note: This action replaces all selected instances of the symbol in all files listed in the Search Results pane. You cannot undo this action.
To apply a change to several places simultaneously, press and hold Alt, and click to place cursors in several places. Any changes you make are applied simultaneously at all the cursor positions.
Use the arrow keys to move all the cursors up and down. The Home and End key move all the cursors to the beginning or to the end of the line.
Press and hold Alt and double-click strings to select several strings simultaneously.
Press Esc to remove all the cursors and selections.
Available under certain Qt licenses.
Find out more.