[Qt-creator] rename ui
duane.hebert at group-upc.com
Mon Dec 12 17:01:15 CET 2016
On 09/12/2016 4:55 PM, Ch'Gans wrote:
> On 10 December 2016 at 02:54, Duane <duane.hebert at group-upc.com> wrote:
>> I have a QMainWindow based class that I want to rename (cpp/h/ui/class name
>> etc.) Is there some howto available for this?
> To rename a file in the project view, the file system view or the open
> documents view: Right click on a file and choose "rename".
> In the code editor, right click on a type name or a variable name,
> select, "refactor", then "rename symbol under cursor" (Shift+Control+R
Thanks. Refactor works well enough to a point. I go to main.cpp and
use refactor to rename the main class. This updates the class in the
h/cpp files and where it is invoked. But it doesn't update the class
name in the ui file or the filenames.
So I have to rename the files manually. Then go to designer and rename
the class there, then fix where the #include "ui_classname.h" is used as
well as any place where it is instantiated.
I was wondering if there was a better way?
More information about the Qt-creator