Results 1 to 2 of 2

Thread: Creating a Symbian's like Application Menu

  1. #1
    Join Date
    May 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Creating a Symbian's like Application Menu

    Hello, I wanted to make an app which is when started it shows a menu. It is just like when you open a Messaging app in S60. Here is a screenshot http://bit.ly/jVDiXo.

    How do I make it? I have tried to make the centralWidget of the QMainWindow as QMenu, and adding QAction to the QMenu. But when I'm running it, the app don't show anything. And I have tried to make the QMenu using QMenuBar. And it is show okay. But I can't use the up/down key to select menu in the device. And when I press the options key (Qt::PositiveSoftKey), the menubar shows up too. And I didn't even add that to menuBar() which is owned by QMainWindow.

    Here is my first code:
    Qt Code:
    1. QAction* act1= new QAction(tr("act1"),this);
    2. QObject::connect(tes,SIGNAL(triggered()),this,SLOT(close()));
    3. QAction* act2= new QAction(tr("act2"),this);
    4. QObject::connect(tes,SIGNAL(triggered()),this,SLOT(close()));
    5. QMenu* menu = new QMenu(this);
    6. menu->addAction(act1);
    7. menu->addAction(act2);
    8. setCentralWidget(menu);
    To copy to clipboard, switch view to plain text mode 
    It shows nothing at the apps.

    And here is my second try:
    Qt Code:
    1. QAction* act1= new QAction(tr("act1"),this);
    2. QObject::connect(tes,SIGNAL(triggered()),this,SLOT(close()));
    3. QAction* act2= new QAction(tr("act2"),this);
    4. QObject::connect(tes,SIGNAL(triggered()),this,SLOT(close()));
    5. QMenuBar* menubar = new QMenuBar(this);
    6. QMenu* menu = menubar->addMenu(tr("menu"));
    7. menu->addAction(act1);
    8. menu->addAction(act2);
    9. setCentralWidget(menu);
    To copy to clipboard, switch view to plain text mode 
    It shows the menu. But when I deploy to the device, I can't use the keypad to select the menu. And at the simulator, if I click other place than the QAction item, the menu lost.

    What is the correct way to do this? Or is my way correct? What should I do next then?
    Last edited by dieend; 6th May 2011 at 06:43.

  2. #2
    Join Date
    Jan 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating a Symbian's like Application Menu


Similar Threads

  1. Error creating a animated menu
    By CassioTC in forum Newbie
    Replies: 3
    Last Post: 26th March 2011, 00:42
  2. [Symbian] show device's menu within a fullscreen application
    By curreli in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 12th September 2010, 07:54
  3. Replies: 1
    Last Post: 9th September 2010, 16:49
  4. creating a "path" for the menu item
    By roxton in forum Qt Programming
    Replies: 4
    Last Post: 17th January 2009, 16:32
  5. Replies: 6
    Last Post: 5th July 2007, 02:00

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.