- resolved regression: no icon on menutray.
This commit is contained in:
parent
c42baaa2c8
commit
1145c74440
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 4.14.2, 2023-02-15T14:22:06. -->
|
<!-- Written by QtCreator 4.14.2, 2023-02-16T21:27:43. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
@ -100,8 +100,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
config.UnitCombobox->addItems({tr("KB"), tr("MB"), tr("GB"), tr("TB"), tr("PB")});
|
config.UnitCombobox->addItems({tr("KB"), tr("MB"), tr("GB"), tr("TB"), tr("PB")});
|
||||||
|
|
||||||
initSystemTrayIcon();
|
initSystemTrayIcon();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::init()
|
void MainWindow::init()
|
||||||
@ -137,9 +135,11 @@ void MainWindow::initSystemTrayIcon()
|
|||||||
{
|
{
|
||||||
QMenu *trayIconMenu;
|
QMenu *trayIconMenu;
|
||||||
QAction * quitAction;
|
QAction * quitAction;
|
||||||
|
QIcon icon;
|
||||||
|
|
||||||
|
icon.addFile(this->icon);
|
||||||
this->trayIcon = new QSystemTrayIcon;
|
this->trayIcon = new QSystemTrayIcon;
|
||||||
this->trayIcon->setIcon(this->windowIcon());
|
this->trayIcon->setIcon(icon);
|
||||||
|
|
||||||
quitAction = new QAction(tr("&Quit"), this);
|
quitAction = new QAction(tr("&Quit"), this);
|
||||||
connect(quitAction, &QAction::triggered, this, &MainWindow::quitApp);
|
connect(quitAction, &QAction::triggered, this, &MainWindow::quitApp);
|
||||||
|
@ -105,6 +105,7 @@ class MainWindow : public QMainWindow
|
|||||||
Ui::windowAbout AboutW;
|
Ui::windowAbout AboutW;
|
||||||
std::vector <QString> serversList;
|
std::vector <QString> serversList;
|
||||||
QSystemTrayIcon * trayIcon;
|
QSystemTrayIcon * trayIcon;
|
||||||
|
QString icon = "/usr/share/icons/RsyncUI.png";
|
||||||
QList<QString> bwUnitText {
|
QList<QString> bwUnitText {
|
||||||
"KB",
|
"KB",
|
||||||
"MB",
|
"MB",
|
||||||
|
Loading…
Reference in New Issue
Block a user