Try this method: <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtoolbutton.html#setToolButtonStyle">http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtoolbutton.html#setToolButtonStyle</a><div>
with one of these values: <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qt.html#ToolButtonStyle-enum">http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qt.html#ToolButtonStyle-enum</a>.</div>
<div><br></div><div>E.g.:</div><div><br></div><div><div>yourButton = QtGui.QToolButton()</div><div>yourButton.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)</div><div>yourButton.setText("Some text")</div>
<div>yourButton.setIcon(QtGui.QIcon("./images/someImage.png"))</div><div>yourButton.setIconSize(QtCore.QSize(140, 140))</div><div>yourButton.clicked.connect(self.onButtonClicked)</div></div><div><br><div class="gmail_quote">
On Wed, Aug 17, 2011 at 03:39, uahmed <span dir="ltr"><<a href="mailto:gleam.uahmed@gmail.com">gleam.uahmed@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi <br><br>Thank you for the reply i search for it <br><br><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtoolbutton.html" target="_blank">http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtoolbutton.html</a><br>
<br>but unfortunately i didnt get any of such method . <br><div><div></div><div class="h5"><br><div class="gmail_quote">On Wed, Aug 17, 2011 at 3:28 AM, Josh Stratton <span dir="ltr"><<a href="mailto:strattonbrazil@gmail.com" target="_blank">strattonbrazil@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">QToolbarButton has a value for putting text underneath, which may be<br>
more what you want.<br>
<div><div></div><div><br>
On Tue, Aug 16, 2011 at 3:20 PM, uahmed <<a href="mailto:gleam.uahmed@gmail.com" target="_blank">gleam.uahmed@gmail.com</a>> wrote:<br>
> HI<br>
><br>
> I want to do alignment in image and text , i want that image should be on<br>
> center top and text should be at the bottom of image . I search for it but<br>
> didnt get the relevant search result . Can you please tell me how to do<br>
> that ?<br>
><br>
> Chunk of Code for Button Without Text:<br>
><br>
> button = QtGui.QPushButton(widget)<br>
> button.setIcon(QtGui.QIcon('default.gif'))<br>
> button.setIconSize(QtCore.QSize(100,100))<br>
> button.setGeometry(xval,yval, 130, 130)<br>
> button.connect(button, QtCore.SIGNAL('clicked()'),<br>
> partial(calluser, user_Handle))<br>
><br>
> Chunk of Code for Button With Text:<br>
><br>
> button = QtGui.QPushButton(widget)<br>
> button.setIcon(QtGui.QIcon('default.gif'))<br>
> button.setIconSize(QtCore.QSize(100,100))<br>
> button[text].setText(QtCore.QString(user_Handle))<br>
> button.setGeometry(xval,yval, 130, 130)<br>
> button.connect(button, QtCore.SIGNAL('clicked()'),<br>
> partial(calluser, user_Handle))<br>
><br>
> Thank You<br>
><br>
> Ahmed<br>
><br>
</div></div>> _______________________________________________<br>
> PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
> <a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Nick Gaens<br>
</div>