[Qt-interest] QPushButton + QIcon with large pixmap
Miguel Cardenas
mfcardenas at gmail.com
Wed Apr 8 23:10:06 CEST 2009
Hello list
Am trying to set a pixmap to a button but have no success... using setIcon()
forces the image to about 16x16 pixmap no matter its original size... in
fact I want a button with a 150x150 image as the original pixmap.
Trying to find an alternative followed the inheritance to QAbstractButton
and QWidget that has a setPixmap() function, but at the QPushButton level
that function it is not accessible or available and anyway there's no
warranty it will work:
ffood.cpp:26: error: 'class QPushButton' has no member named 'setPixmap'
What can I do to use larger images for buttons (instead of text)? my code is
this:
#include "mypixmap.xpm"
...
mybutton = new QPushButton;
mybutton->setIcon( QIcon( QPixmap(mypixmap) ) );
but mypixmap is automatically forced to something like 16x16 while I expect
it as 150x150
What can I do??? HELP!!!!!!!
Thanks
--
Miguel Cardenas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090408/97f5281a/attachment.html
More information about the Qt-interest-old
mailing list