Skip to content

Instantly share code, notes, and snippets.

@40
Created June 28, 2012 03:46
Show Gist options
  • Select an option

  • Save 40/3008872 to your computer and use it in GitHub Desktop.

Select an option

Save 40/3008872 to your computer and use it in GitHub Desktop.
Swipe Down BB10 Cascades Application
#include <bb/Application>
#include <QtCore/QObject>
#include <QtCore/QString>
class TestObject: public QObject {
Q_OBJECT
public Q_SLOTS:
void swiped();
};
void TestObject::swiped() {
// Do something here
}
int main(int argc, char **argv) {
bb::Application app(argc, argv);
TestObject testObject;
QObject::connect(app, SIGNAL( swipeDown()), testObject, SLOT( swiped()));
return app.exec();
}
@mk0x9
Copy link

mk0x9 commented Jun 28, 2012

../src/main.cpp:19:76: error: no matching function for call to 'QObject::connect(bb::Application&, const char*, TestObject&, const char*)' 😌

@mk0x9
Copy link

mk0x9 commented Jun 28, 2012

When I moved TestObject class definition to separate file, it worked fine for me.

@40
Copy link
Author

40 commented Jun 28, 2012

Thank you.

@meghasanghvi
Copy link

Hi,
I get the same error as tensai-cirnois getting no matching function for call to 'QObject::connect(bb::Application&, const char [13], TestObject&, const
char [9])'. I also moved the TestObject class definitation to separate file but still i get this error.

@40
Copy link
Author

40 commented Sep 17, 2012

@meghasanghvi

Just updated the code to reflect recent changes to the OS release. Please take a look at
http://cascadescode.tumblr.com/post/31737759824/update-how-to-make-swipe-down-menu-w-custom-icons-for

New Gist - App.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment