I have some problems with pyqt. I have to example files:
- login.ui
- login.qrc
So, the login.ui, maked with the qt designer uses some resources of the qrc file. The qrc have some images for the buttons created in ui file.
The qrc file is using an directory images, where's the images of the buttons. It works only in the qt designer. If I open in the qt designer of the QtCreator, in C++, it shows the buttons with the respective icons.
My python file "Login.py" is like this:
from PyQt4 import QtGui, uic
import sys
class Form(QtGui.QDialog):
def __init__(self, parent = None):
QtGui.QDialog.__init__(self, parent)
uic.loadUi("login.ui", self)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
ui = Form()
ui.show()
sys.exit(app.exec_())
It's importing the ui file. Now the problem:
When I run the program, the icons don't show. The files are setup in the correct folders. But when I run the app, the icons don't appears.
Should I make some configuration in my python file? Am I missing something?
Thank's guys. ^^