Results 1 to 4 of 4

Thread: QMenu::Scroller StyleSheet

  1. #1
    Join Date
    Oct 2008
    Posts
    15
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QMenu::Scroller StyleSheet

    Hi,
    Has anyone used this style in windows. Can anyone please tell me how we can use this style in windwos.

    Thanks

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMenu::Scroller StyleSheet

    From the docs -
    QStyleOptionMenuItem::Scroller 4 A popup menu scroller (currently only used on Mac OS X).
    Does that answer your question ?

  3. #3
    Join Date
    Oct 2008
    Posts
    15
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QMenu::Scroller StyleSheet

    Hi,
    Thanks for the help. I have already read this. To implement this scroller manually, I have create 2 toolbutton and insert the button to the widget action. Here is the code. Does this approach is good.

    QToolButton *pUpArrow = new QToolButton(this);
    pUpArrow->setIcon(QIcon (":/Resources/ViewDocumentShow.png"));
    pUpArrow->setAutoRaise(true);
    pUpArrow->setToolButtonStyle(Qt::ToolButtonIconOnly);
    pUpArrow->setMaximumHeight(12);

    QList<QAction *> qActionList = pMenu->actions();
    QAction* ACTION1 = qActionList[0];
    QWidgetAction* actionUp = new QWidgetAction(pMenu);
    actionUp->setDefaultWidget(pUpArrow);
    pMenu->insertAction(actionUp, actionUp);

    Thanks and Regards
    Amol.

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMenu::Scroller StyleSheet

    Can you show how a scroller looks like ? I havent used Mac so dont know how it functions

Similar Threads

  1. QTabbar style ::scroller to expand the tab scoll button space.
    By AmolShinde_8 in forum Qt Programming
    Replies: 0
    Last Post: 22nd February 2010, 14:40
  2. Help with QMenu item stylesheet
    By Sufu in forum Qt Programming
    Replies: 11
    Last Post: 9th May 2009, 06:58
  3. Customizing QTabBar::scroller
    By chaoticbob in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2008, 10:16
  4. QMenu
    By toki83 in forum Qt Programming
    Replies: 2
    Last Post: 22nd March 2008, 11:17
  5. QMenu Help pls
    By munna in forum Newbie
    Replies: 2
    Last Post: 19th March 2006, 15:36

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.