Active Topics

 


Reply
Thread Tools
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#1
Hello,

can someone tell me, how to get the menu, that appears from the top (for example when pressing clock in standby mode)?

QMenuBar is creating ad different style menu.
I'm using Qt 4.5 and Maemo 5.
__________________
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!

Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google

Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!

Bored? Follow me
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#2
Depends on the actual build. A while ago you had to define a property o the QActions in it, nowadays it's automatic.

Hildon menus

Hildon menus are supported by Qt. qt-4.5.3-xxxx-maemo4 packages needs QActions in a "fremantle" menu. Packages with version > qt-4.5.3-xxxx-maemo4 hildonize the menu automaticall.

This and many other goodies found on

http://wiki.maemo.org/Qt4Hildon
 

The Following 3 Users Say Thank You to attila77 For This Useful Post:
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#3
Please, can you give me some example?
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#4
Originally Posted by Figa View Post
Please, can you give me some example?
Code:
action1 = new QAction(tr("&ACTION1"), this);
action2 = new QAction(tr("&ACTION2"), this);

menu = menuBar()->addMenu(tr("MENU TITLE"));
menu->addAction(action1);
menu->addAction(action2);

connect(action1, SIGNAL(triggered()), this , SLOT(doAction1()));
connect(action2, SIGNAL(triggered()), this , SLOT(doAction2()));
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following User Says Thank You to krk969 For This Useful Post:
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#5
THX I did it but I cant see any menu. What I do have to do?
Code:
QWidget *master = new QWidget();
		QAction *action1 = new QAction(tr("&ACTION1"), this);
		QAction *action2 = new QAction(tr("&ACTION2"), this);

		connect(action1, SIGNAL(triggered()), this , SLOT(doAction1()));
		connect(action2, SIGNAL(triggered()), this , SLOT(doAction2()));
		master->addAction(action1);
		master->addAction(action2);

Last edited by Figa; 2010-03-10 at 16:56.
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#6
Originally Posted by Figa View Post
THX I did it but I cant see any menu. What I do have to do?
pls attach your code so somebody can try and help
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#7
Sorry I did it too late
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#8
as mentioned in my post above you need to do this

QMenu *menu = menuBar()->addMenu(tr("MENU TITLE"));

on a QMainWindow object to see the menu.
and then actions need to be added to this menu object.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”

Last edited by krk969; 2010-03-10 at 17:03.
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#9
I dont understand what is menu?
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#10
Originally Posted by Figa View Post
I dont understand what is menu?
check here
ive added more details to my previous post above
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following 2 Users Say Thank You to krk969 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 06:26.