开发者

Qt TrayIcon when Minimizing the Window

Well i have this piece of code:

void MainWindow::ev开发者_StackOverflow中文版ent(QEvent *event)
    {
        if(event->type() == QEvent::WindowStateChange) {
            if(isMinimized()) {
                trayIcon->show();
                hide();
                event->ignore();
            }else{
                event->accept();
            }
        }
    }

Well, basically yes. I'm trying that when the Window is minimized, it creates the tray Icon and hides the application from Taskbar. Whatever, i keep getting "No 'void MainWindow::event(QEvent *)' member function declared in class 'MainWindow'" When the autocomplete shows it.

Any idea?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜