aboutsummaryrefslogtreecommitdiff
path: root/demos/widgetsgallery/pushbuttonpage.cpp
diff options
context:
space:
mode:
authorTomas Junnonen <tomas.junnonen@nokia.com>2010-05-14 17:40:46 +0300
committerTomas Junnonen <tomas.junnonen@nokia.com>2010-05-14 17:40:46 +0300
commit4b7756b0cfd2f49e6cccaa954593379d851b4c45 (patch)
tree2ddb139a6dea0323e24d1982e7def7505defdf9f /demos/widgetsgallery/pushbuttonpage.cpp
parentfb49c096a4ad55d175b47cc5a910d0b540349db1 (diff)
Changes: Add new icon() property on MButton, that takes a QIcon
By: James Ketrenos RevBy: Tomas Junnonen Details: Using MButton::setIcon a caller can now set a QIcon to be used within the button widget. When called, the toggledIcon state is set to the QICon::Selected mode of the QIcon. A subsequent call to set the toggledIconID() can set the pixmap data to a state other than what is in the QIcon. This is needed for applications which either want to render their own icon graphics at run-time or want to use an image loader like Qt's QIcon::fromTheme()
Diffstat (limited to 'demos/widgetsgallery/pushbuttonpage.cpp')
-rw-r--r--demos/widgetsgallery/pushbuttonpage.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/demos/widgetsgallery/pushbuttonpage.cpp b/demos/widgetsgallery/pushbuttonpage.cpp
index 56f00129..0f8900c7 100644
--- a/demos/widgetsgallery/pushbuttonpage.cpp
+++ b/demos/widgetsgallery/pushbuttonpage.cpp
@@ -60,6 +60,7 @@ void PushButtonPage::createContent()
containerPolicy->addItem(pushButton2);
pushButton3 = new MButton();
+ pushButton3->setIcon(QIcon::fromTheme("phone"));
containerPolicy->addItem(pushButton3);
retranslateUi();