Hi i am new to QML and trying to run a small QML program using c++ extension in Qt-5.4.0

here is my code app.qml

Qt Code:
  1. import QtQuick 2.1
  2. import QtQuick.Controls 1.0
  3.  
  4. Button {
  5. id: generate
  6. text: qsTr("&Generate")
  7. onClicked: generate.btn_clicked()
  8. }
To copy to clipboard, switch view to plain text mode 

button.h
Qt Code:
  1. #ifndef BUTTON_H
  2. #define BUTTON_H
  3.  
  4. #include <QDeclarativeItem>
  5. #include <QObject>
  6. #include <QDebug>
  7. #include <QWidget>
  8.  
  9. class BButton : public QWidget
  10. {
  11. Q_OBJECT
  12.  
  13. public:
  14. BButton();
  15.  
  16. Q_INVOKABLE void btn_clicked();
  17.  
  18. };
  19. #endif
To copy to clipboard, switch view to plain text mode 

button .cpp
Qt Code:
  1. #include "button.h"
  2.  
  3. BButton::BButton()
  4. {
  5. //nothing to write
  6.  
  7. }
  8. void BButton::btn_clicked()
  9. {
  10. qDebug("THE GUI was clicked");
  11. }
To copy to clipboard, switch view to plain text mode 

main.cpp
Qt Code:
  1. #include "button.h"
  2. #include <qdeclarative.h>
  3. #include <QDeclarativeView>
  4. #include <QApplication>
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8. QApplication app(argc, argv);
  9.  
  10. //qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
  11.  
  12. QDeclarativeView view;
  13. view.setSource(QUrl::fromLocalFile("app.qml"));
  14. view.show();
  15. return app.exec();
  16. }
To copy to clipboard, switch view to plain text mode 

While executing using qmlscene the GUI was creating fine but on clicking the button it is showing the following error
file:///root/Btn_Sig/app.qml:7: TypeError: Property 'btn_clicked' of object Button_QMLTYPE_35(0x161c950) is not a function
Please tell me is there anything more to add in my code to generate the output or did i miss something.

Thanks in advance,
Rohith.G