problem with winevent Function
Hi i am new for QT and i need to use winEvent function but an error appear when i try build my project:
my code is :
Code:
bool MainWindow::winEvent(MSG *message, long *result)
{
//handling message...........
return 0;
}
this is the error prevent building:
Code:
C:\Users\ETC\Documents\QTProjects\Calculator-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\Calculator\mainwindow.cpp:16: error: no 'bool MainWindow::winEvent(MSG*, long int*)' member function declared in class 'MainWindow'
Re: problem with winevent Function
It looks like you are missing the declaration matching this implementation in the protected section of your main window header file.
Re: problem with winevent Function
thanks for replay
I don't think that because i find the declaration in QWidget.h by click "Switch between method declaration/definition" in the context menu.
here is the declaration :
#if defined(Q_WS_WIN)
virtual bool winEvent(MSG *message, long *result);
I built this project successfully few days ago !!!!!!!!! I don't know what happened and what is the solution !!!!!!
please some advice may be helpful
thanks for advanced
Added after 6 minutes:
please any help !!!!!!!!!!!!
i am really need the solution
Re: problem with winevent Function
ChrisW67 already answered, its basic C++ - if you want to reimplement a method in a subclass, you need to declare it again.