Python Forum
[PyQt] Setting icon on QAction from outside QGuiApplication
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Setting icon on QAction from outside QGuiApplication
#4
(Jan-02-2023, 06:56 PM)deanhystad Wrote: QApplication() creates a QApplication object, and it sets up your application to run Qt. If you try to create a QAction object before calling QApplication(), you don't have the application framework required to manage the QAction object. The same thing happened when you tried to make a QIcon

Thank you both, that seems to fix the problem and totally makes sense.
Hoper this doesn't have consequences in terms of efficiency.
Reply


Messages In This Thread
RE: Setting icon on QAction from outside QGuiApplication - by gradlon93 - Jan-04-2023, 11:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] QAction bold part of the string argument malonn 4 2,353 Sep-12-2022, 05:00 PM
Last Post: malonn
  PyQt6 QAction with icon and string malonn 2 1,759 Sep-12-2022, 11:59 AM
Last Post: malonn
  how to remove icon ilyess68ysl 4 3,798 Oct-15-2021, 10:05 AM
Last Post: ilyess68ysl
  Icon in tkinter menator01 8 5,068 May-03-2020, 02:01 PM
Last Post: wuf
  [Tkinter] Password Reveal Icon Evil_Patrick 2 4,723 Nov-29-2019, 02:20 PM
Last Post: Evil_Patrick
  [Tkinter] Window Icon Evil_Patrick 6 8,165 Oct-18-2019, 11:26 AM
Last Post: Evil_Patrick
  Button with Image Icon Friend 2 6,881 Jul-25-2019, 09:39 AM
Last Post: Friend
  [PyQt] Hide Dock Icon for QSystemTrayIcon App AeglosGreeenleaf 0 3,343 Jun-20-2019, 07:21 PM
Last Post: AeglosGreeenleaf
  [PyQt] How is this tray icon throbber done? JackDinn 7 4,889 Mar-05-2018, 02:19 PM
Last Post: JackDinn

Forum Jump:

User Panel Messages

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