Whoopps I done it again - how to rename "MainWindow" ?
Unsolved
General and Desktop
-
I did not pay attentions and build a standard "MainWindow" project.
It saves time and it is easier to debug to build a project and ad it as subproject / library to the main project later...
Now I have to rename all "MainWindow" to something else...
I am planning to do it BEFORE I add the project to the main project - which already has "MainWindow"...Not that easy task when QDesigner is used to manage forms.
Of course I make few backups...
Any helpful suggestions how to make the job easier would be appreciated.
ThanksHere is what I mean - it is NOT that easy to "serch and re-place "
-
If using an IDE that supports refactoring then there is sometimes a command to do it for you, otherwise...brute force
in linux
for i in $(rgrep -H MainWindow . | awk '{ FS=":"; print $1; }'); do sed -i .bak 's/$i/new_name/g' $i done
-
@AnneRanch I would suggest:
- Right click on your project
- Choose Qt Files and Classes template
- Choose Qt Designer Form Class
- Select Main Window
- This time, name it like you want it to
- Finish the wizard
- Delete old "MainWindow" from project