Python Forum
[PyQt] QActions and Unicode glyphs
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] QActions and Unicode glyphs
#1
I'm trying to add Unicode glyphs to a QAction. But, my attempts thus far are crashing my desktop (actually logging me out). How do I use Unicode characters in QActions?
I've tried directly in the IDE like so:
QAction("• my string")

I've tried via Python (3.10.5) escape sequences, like so:
QAction("\u0394 my string")

and finally, I've tried with QObject.tr(), like so:
str = QObject.tr("\u0394 my string")
QAction(str)
How do I pass unicode characters to a QAction? I don't want crashes, now-what-i-mean.
Reply


Messages In This Thread
QActions and Unicode glyphs - by malonn - Oct-05-2022, 12:38 PM
RE: QActions and Unicode glyphs - by Axel_Erfurt - Oct-05-2022, 12:54 PM
RE: QActions and Unicode glyphs - by malonn - Oct-05-2022, 12:57 PM
RE: QActions and Unicode glyphs - by menator01 - Oct-05-2022, 04:27 PM
RE: QActions and Unicode glyphs - by malonn - Oct-05-2022, 07:44 PM
RE: QActions and Unicode glyphs - by Axel_Erfurt - Oct-05-2022, 07:51 PM
RE: QActions and Unicode glyphs - by malonn - Oct-05-2022, 11:38 PM
RE: QActions and Unicode glyphs - by malonn - Oct-06-2022, 06:58 PM
RE: QActions and Unicode glyphs - by Axel_Erfurt - Oct-06-2022, 08:07 PM
RE: QActions and Unicode glyphs - by malonn - Oct-06-2022, 09:08 PM

Forum Jump:

User Panel Messages

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