[PyQt] Designer -- fromTheme Icon

Ramiro Algozino algozino at gmail.com
Sun Mar 18 05:20:18 GMT 2012


Hello!

 Today I was designing a window for my application and happily discovered
that designer now supports using fromTheme icons in actions and buttons!
:-D but when I use the .ui file I get this error:

[...]
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/icon_cache.py", line
106, in _file_name
    fname = fname.replace("\\", "\\\\")
AttributeError: 'NoneType' object has no attribute 'replace'

am I doing something wrong or is this some kind of bug? If I set an
arbitrary file icon instead a fromTheme one everything works just fine..
:-( I would really like to set the system theme icons from designer instead
of having to do it from code to keep the code cleaner.

This is how I load the ui:

class MainWindow(QtGui.QMainWindow):
    def __init__(self, app):
        QtGui.QMainWindow.__init__(self)
        uic.loadUi('main.ui', self)


Thank you!
-- 
Ramiro Algozino
http://ramiroalgozino.com.ar/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120318/0b7e43d5/attachment.html>


More information about the PyQt mailing list