Qt Creator "override method"?

Does Qt Creator have a "override method" shortcut like eclipse?

For those who do not know eclipse, there is a context menu "Source> Override Method", which displays a dialog. Check the method you want to override and it will generate stubs for this method.

+4
source share
2 answers

The closest available in QtCreator is Add Definition to *cpp . Let's say you have a void paintEvent(QPaintEvent* e) declaration void paintEvent(QPaintEvent* e) in the header file, than if you select a function and you see a context menu under Refactor , there is an Add Definition to cpp option

+1
source
  • right click on class name
  • from the context menu, select Refactoring β†’ Insert virtual functions of base classes

btw, I am using Qt Creator 3.4.1.

+14
source

Source: https://habr.com/ru/post/1396962/


All Articles