fix: qmenu memory leak

This commit is contained in:
rankun 2021-05-31 15:20:13 +08:00
parent 02457245bb
commit da60163b3d

View file

@ -79,9 +79,9 @@ Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog)
m_hideIcon = new QSystemTrayIcon(this);
m_hideIcon->setIcon(QIcon(":/image/tray/logo.png"));
m_menu = new QMenu();
m_quit = new QAction();
m_showWindow = new QAction();
m_menu = new QMenu(this);
m_quit = new QAction(this);
m_showWindow = new QAction(this);
m_showWindow->setText(tr("show"));
m_quit->setText(tr("quit"));
m_menu->addAction(m_showWindow);