setWindowIcon

This commit is contained in:
mrbesen 2022-05-21 00:29:36 +02:00
parent 2b9010334c
commit c1e92c1706
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,7 @@ QMAKE_CLEAN += $$TRANSLATIONSQM
unix {
$$PWD/linuxdeploy-x86_64.AppImage.commands = wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod u+x linuxdeploy-x86_64.AppImage
$$PWD/lolautoaccept.png.commands = inkscape -z -e lolautoaccept.png -w 512 -h 512 lolautoaccept.svg
$$PWD/lolautoaccept.png.commands = inkscape -z -e $$PWD/lolautoaccept.png -w 512 -h 512 $$PWD/lolautoaccept.svg
appimg.depends = $$PWD/linuxdeploy-x86_64.AppImage $${TARGET} $$PWD/lolautoaccept.png
appimg.commands = rm -rf AppDir ; \

View File

@ -62,9 +62,12 @@ int main(int argc, char** argv) {
Log::warn << "translation not found";
}
MainWindow win(lolaa);
QIcon icon(QString::fromStdString(base + "lolautoaccept.png"));
win.setWindowIcon(icon);
while(!lolaa.init()) {
QMessageBox warn;
warn.setWindowIcon(icon);
warn.setWindowTitle(MainWindow::tr("LoL-Auto-Accept"));
warn.setText(QMessageBox::tr("League of Legends Client not found!"));
warn.setInformativeText(QMessageBox::tr("Open the client and retry or close."));