×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    77

    Set stylesheet for menubar / menupane

    Hey,

    My application is in FULL SCREEN mode with softkeys only visible. My application widget has a different background color. While the Menu Bar is having the default theme.

    In the widget displaying full screen, the following code snippet is used for showing the menu bar.

    Code:
    Qt::WindowFlags flags = windowFlags();
    			flags |= Qt::WindowSoftkeysVisibleHint;
    			setWindowFlags(flags);
    				
        		 m_menu = new QMenu(this);
        		m_menu->setStyleSheet("background-color: #fff");
        		m_menu->addAction("Logout", this, SLOT(on_logout_clicked()));
    			
    			QAction *optionsAction = new QAction("Options", this);
    			optionsAction->setMenu(m_menu);
    			optionsAction->setSoftKeyRole(QAction::PositiveSoftKey);
    			addAction(optionsAction); 
    			
    			QAction *backSoftKeyAction = new QAction(QString("Back"), this);
    			backSoftKeyAction->setSoftKeyRole(QAction::NegativeSoftKey);
    			QObject::connect(backSoftKeyAction, SIGNAL(triggered()), this, SLOT(previousView()));
    			addAction(backSoftKeyAction);
    Help me with the following:
    1. I am unable to get the instance of the menubar.
    2. Also, how can I set the stylesheet for the menubar/menupane. (not for menu items)


    Thanks,
    Deeps

  2. #2
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: Set stylesheet for menubar / menupane

    You can't apply a stylesheet to a native options menu. The current Qt release for Symbian does not even attempt to stylesheet it. Even if it would, it could only use some parts of stylesheets, as native menu component does not support all the options available for stylesheets.

Similar Threads

  1. Wiki stylesheet
    By grahamhughes in forum Feedback on Forum Nokia's Renewal 2010
    Replies: 4
    Last Post: 2010-07-03, 22:00
  2. How to change menubar or menupane?
    By ahsp83 in forum Symbian User Interface
    Replies: 19
    Last Post: 2009-01-29, 13:52
  3. Can I set the background image of menupane and listbox dynamically?
    By haoniukun in forum Symbian User Interface
    Replies: 4
    Last Post: 2007-06-27, 16:01
  4. Opening a MenuBar from CeikDialog. Menubar does not gain focus.
    By jkekoni in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-05-11, 11:10
  5. Replies: 0
    Last Post: 2006-01-20, 06:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×