Closed Martinix75 closed 7 months ago
I understood (and solved the problem .. maybe), written so by problems, NOT work:
nimqt.init
let app1 = newQApplication(commandLineParams())
let icona = newQIcon(Q "Icons/panoratux.png")
etc.....
finestra.setCentralWidget(centrale)
finestra.setWindowTitle(Q"MainWindow")
finestra.setGeometry(600, 500, 250, 150)
finestra.setWindowIcon(newQIcon(icona)
finestra.show()
discard app1.exec()
Written like this it works (even in the Mian Window menus):
#let icona = newQIcon(Q "Icons/eco.png") <-- now commented !!
.....
finestra.setCentralWidget(centrale)
finestra.setWindowTitle(Q"MainWindow")
finestra.setGeometry(600, 500, 250, 150)
finestra.setWindowIcon(newQIcon(Q "Icons/panoratux.png"))
finestra.show()
discard app1.exec()
So I would say that the post can be closed! bye by A. Martin
As I anticipated, for the same code, you can no longer load the icon on the window, the code that placed, previously it worked, now from an error:
errore:
If you want to try it, I think it is sufficient to put an icon of your choice next to this file! (with Nimqt 0.1.x) it worked! Hello and good evening! P.S. I'm now trying the "mianwindow", prepared for the worst :)