View Full Version : QMenu::Scroller StyleSheet
AmolShinde_8
4th March 2010, 06:36
Hi,
Has anyone used this style in windows. Can anyone please tell me how we can use this style in windwos.
Thanks
aamer4yu
4th March 2010, 06:45
From the docs -
QStyleOptionMenuItem::Scroller 4 A popup menu scroller (currently only used on Mac OS X).
Does that answer your question ?
AmolShinde_8
4th March 2010, 07:32
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.
aamer4yu
4th March 2010, 08:46
Can you show how a scroller looks like ? I havent used Mac so dont know how it functions :(
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.