Le 09/09/11 16:05, Maxwell, Thomas P. (GSFC-606.2)[SCIENCE APPLICATIONS INTL CORP] a écrit :
I am creating a button with an icon:

        icon = QIcon ( iconFile )
        button = QPushButton(  icon, label, parent )

The icon as saved in the file is rather large, but is always scaled down to
a tiny size when displayed in the button.   Is there any way to get the
QPushButton to display the icon at full size?    Also, is there any way to
get the QPushButton to display the label below the icon (instead of to the
right)?

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

For the icon you can fix his size

button.setIconSize(32, 32)

 ... if the button's size is minimum 32 x 32

For the position of text, consider to use QToolButton instead of QPushButton

button.setToolButtonStyle(style)

See here for style:

    http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qt.html#ToolButtonStyle-enum

Regards
--
Vincent V.V.
Oqapy . Qarte+7 . PaQager
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
  • [PyQt] seg... David Cortesi
    • Re: [... Hans-Peter Jansen
      • [... Maxwell, Thomas P. (GSFC-606.2)[SCIENCE APPLICATIONS INTL CORP]
        • ... Vincent Vande Vyvre

Reply via email to