I am unable to set Icon to my push button in my pyqt application when using with fbs. It doesn't give error no matter what path i give to QIcon function, due to which i am unable to figure out where i am going wrong
My Code
appctxt = ApplicationContext()
version = appctxt.build_settings["version"]
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Hellow World v" + version)
w = QWidget()
layout = QVBoxLayout()
btn = QPushButton("press")
btn.setIconSize(QSize(20, 20))
btn.setIcon(QIcon("../resources/256.png"))
layout.addWidget(btn)
w.setLayout(layout)
self.setCentralWidget(w)
if __name__ == '__main__':
window = MainWindow()
window.show()
exit_code = appctxt.app.exec_()
sys.exit(exit_code)
My File Structure