[Qt-interest] [QtS60-feedback] FW: how to add menu dynamically in Qt
Ramesh
ramesh.bs at robosoftin.com
Fri May 7 07:56:05 CEST 2010
Oops, thanks Anttila...
I was thinking to log a bug.. any way thanks for saving time.. Thanks lot..
Have nice day..
-----Original Message-----
From: Anttila Janne [mailto:Janne.Anttila at digia.com]
Sent: Friday, May 07, 2010 11:21 AM
To: Ramesh; qt-interest at trolltech.com; QtS60-feedback at trolltech.com
Subject: RE: [QtS60-feedback] FW: how to add menu dynamically in Qt
Qt for Symbian does not yet support Qmenu::aboutToShow/aboutToHide signals.
For more information see http://bugreports.qt.nokia.com/browse/QTBUG-8698
Br,
- Janne
>-----Original Message-----
>From: qts60-feedback-bounces at trolltech.com
>[mailto:qts60-feedback-bounces at trolltech.com] On Behalf Of Ramesh
>Sent: Thursday, May 06, 2010 4:34 PM
>To: qt-interest at trolltech.com; QtS60-feedback at trolltech.com
>Subject: [QtS60-feedback] FW: how to add menu dynamically in Qt
>
>I have added some additional information with this mail..
>
>
>
> QAction *action = new QAction("Test",this);
>
> QAction *dummyaction = new QAction("Testing",this);
>
> QMenu *menu = new QMenu();
>
> menu->addAction(dummyaction);
>
>
>
> bool val= connect(menu, SIGNAL( aboutToShow()), this,
>SLOT( Move()));
>
> val= connect(menu, SIGNAL( aboutToHide()), this, SLOT(Move()));
>
>
>
> action->setMenu(menu);
>
> this->menuBar()->addAction(action);
>
>
>
>if I do like this, I am able to see one submenu item. But
>before that Move slot should call, its not getting called..
>and even before hide also the same slot should call.. its not coming..
>
>
>
>I tried the return values of connect.. its true only... so what
>is wront with my code.. please say..
>
>
>
>Thanks
>
>
>
>
>
>Hi,
>
>
>
>I want to add, submenu to a menu item dynamically. How can I
>achive this?
>
>
>
>I tried like this,
>
>I have created an Action and submenu. Then I have added the
>submenu to action.
>
>But, I have connected the "triggered" signal of action. its
>getting crash if I click on the action..
>
>
>
>I have also handled the "aboutToShow" signal of menu, same its
>also getting crash when I click on action..
>
>
>
>Here is the sampe code.
>
>
>
>Submenu = new QMenu(this);
>
>connect(Submenu, SIGNAL( aboutToShow()), this, SLOT(move ()));
>
>
>
> QAction *test = new QAction(tr("Selection"), this);
>
> test ->setMenu(Submenu);
>
>
>
> menubar()->addAction(test);
>
>
>
>I want to get the notification, before the display of submenu..
>
>
>
>
>
>
>
>
>-----------------------------------------------
>
>Robosoft Technologies - Come home to Technology
>
>Disclaimer: This email may contain confidential material. If
>you were not an intended recipient, please notify the sender
>and delete all copies. Emails to and from our network may be
>logged and monitored. This email and its attachments are
>scanned for virus by our scanners and are believed to be safe.
>However, no warranty is given that this email is free of
>malicious content or virus.
>
>
>
-----------------------------------------------
Robosoft Technologies - Come home to Technology
Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
More information about the Qt-interest-old
mailing list