Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 154
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
My Carrier: SFR

Re: Issue to do a "swipe down" menu

Hi,

Thx for your reply, but I prefer my menu Smiley Happy

There is still a missing in my menu implemenation ; how to catch and don't propagate a touch screen outside of the menu ? To be able to close the menu...

Nicolas
Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Issue to do a "swipe down" menu

https://www.blackberry.com/jira/browse/BBTEN-182

 

Check again in the next drop.

 

Stuart

Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: Issue to do a "swipe down" menu

[ Edited ]

Hi,

I add the following code inside my main.cpp file and in portrait mode i am able to get the swipe down event.

Code:  QObject::connect(&app, SIGNAL(swipeDown()), &mainApp, SLOT(swipeDownMenu()));

But when i run my application on landscape mode swipe down event is not fire, Anyone have any solution to this why swipeDown() is not fire on landscape?.
One more thing i observed is when i run this code on Beta1 device it generate signal but when i run the same code on Beta2 device(10.0.6) it will not generate signal.

My code: 

main.cpp

#include <bb/cascades/Application>
#include <QtCore/QLocale>
#include <QtCore/QTranslator>

#include "app.hpp"

using ::bb::cascades::Application;

int main(int argc, char **argv)
{
Application app(argc, argv);

App mainApp;

QObject::connect(&app, SIGNAL(swipeDown()), &mainApp, SLOT(swipeDownMenu()));


return Application::exec();

}

 

App.hpp

#ifndef APP_H
#define APP_H

#include <QtCore/QObject>
#include <QtCore/QMetaType>

#include <bb/cascades/Event>
#include <bb/cascades/UiObject>
#include <bb/cascades/Control>

class App : public QObject
{
Q_OBJECT

public:
App();
void startEvent();
public slots:
void swipeDownMenu();
};

#endif // ifndef APP_H

 

App.cpp

#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/AbstractPane>

#include "app.hpp"

using namespace bb::cascades;

App::App() {
QmlDocument *qml = QmlDocument::create("main.qml");
qml->setContextProperty("cs", this);

AbstractPane *root = qml->createRootNode<AbstractPane>();
Application::setScene(root);
}

void App:: swipeDownMenu(){

qDebug() << "SwipeDownMenu is called";
}

 

Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Issue to do a "swipe down" menu

Read the description of the JIRA mentioned in the post just above your post.

Is this not exactly what you are describing?

 

Stuart