Thread
:
Simple PyQt help, please
View Single Post
08-16-2014, 11:05 AM
#
6
kovidgoyal
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Avoid eval(), it is a security risk, while in this case it is probably harmless, if you want a one-liner, do this, instead:
from PyQt5 import Qt as QtGui
button = getattr(QtGui, widget)()
kovidgoyal
View Public Profile
Visit kovidgoyal's homepage!
Find More Posts by kovidgoyal
Track Posts by kovidgoyal via RSS