Using the Refactor => "Insert virtual functions of base class" does not insert virtual functions for base classes which are itself base classes (and do not re-declare the virtual function).
E.g in this example I filtered to find the headerData() method and it pops up in three derived classes (red arrows). As you can see, I've chosen the direct base class method of my class.
After pressing "Ok" nothing was inserted.
If I choose the top most listing of headerData() ( the on in QAbstractItemModel) in get the method inserted in my code.
I attached the test code.