`override` specifier in Qt



  • Hello,

    I added an override specifier to an overridden method, but I have

    method with override specifier 'override' did not override any base class methods

    My a class extending a QWidget and I'm trying to override ​closeEvent which is virtual. I'm using Qt 5.4.0, Win7.


  • Moderators

    It would be helpful to include your code.

    Right now I can only say you made a mistake somewhere :)



  • Hi Chris, you right, as always :). But it's not an usual typo. I copied function name from documentation and it seems some hidden symbols copied too. I typed same function manually and everything start to work (and function name become typed in italic).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.