Python Forum
[PyQt] pushbutton with image
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] pushbutton with image
#1
hi all,

is there possible to make Qpushbutton with logo/pic like below?
https://ibb.co/k2fRLFn
Reply
#2
Yup you can.

button = QPushButton(win)
button.setIcon(QtGui.QIcon('myImage.jpg'))
I copied the code from here, as reference.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGUI] Pushbutton in ANSA Aishaf 2 2,566 Apr-27-2021, 11:22 AM
Last Post: Aishaf
  [PyQt] Add command to PushButton skaailet 1 1,660 Apr-11-2020, 01:46 PM
Last Post: deanhystad
  TypeError when using PushButton (PyQt5) lmsavk 1 6,674 Mar-03-2019, 04:21 PM
Last Post: Alfalfa
  pyqt clickable pushbutton problem pythonck 1 7,595 Dec-12-2017, 03:38 PM
Last Post: pythonck
  keeping track of pushbutton click iFunKtion 3 4,215 Mar-13-2017, 12:18 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020