Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qbittorrent tray icon issue with Qt5 5.11.1 #9240

Closed
firew4lker opened this issue Jul 26, 2018 · 5 comments · Fixed by #10590
Closed

Qbittorrent tray icon issue with Qt5 5.11.1 #9240

firew4lker opened this issue Jul 26, 2018 · 5 comments · Fixed by #10590
Labels
GUI GUI-related issues/changes

Comments

@firew4lker
Copy link

qBittorrent version and Operating System

Version: 4.1.1
O.S.: Arch Linux

If on linux, libtorrent and Qt version

libttorrent: 0.13.7
Qt5: 5.11.1

What is the problem

If I open the application and close it to the system tray, if I click to restore it, the application doesn't show anything. No controls. Just a blank for. The application seems to function normally though (I can control Qbittorent from web interface). I also noticed that the issue occurs only when closing the application from the "x". If I bring up from the tray by clicking the icon it opens just fine. Once I close it to tray, using the "x", it wont restore normally.

This is the change that causes the issue:

http://code.qt.io/cgit/qt/qtbase.git/commit/?id=e0b5ff4a

@zeule
Copy link
Contributor

zeule commented Jul 26, 2018

Copying the logic from MainWindow::event() for QEvent::WindowStateChange into MainWindow::closeEvent() seems to fix the problem:

   if (!m_forceExit && m_systrayIcon && goToSystrayOnExit && !this->isHidden()) {
-        hide();
-        e->accept();
+        e->ignore();
+        QTimer::singleShot(0, this, &QWidget::hide);

@glassez glassez added the GUI GUI-related issues/changes label Jul 26, 2018
@mthw0
Copy link

mthw0 commented Jul 28, 2018

I can confirm, I also have this issue.

@rawlife56
Copy link

Can comfirm this too.

@noquierouser
Copy link

Can confirm this issue too. As stated by @firew4lker, clicking Hide in the tray icon and then Show from that same icon has the expected behavior. Yet when clicking the window Close button and then clicking Show on the tray icon shows a blank window.

@onlined
Copy link
Contributor

onlined commented Jan 20, 2019

@zeule Will you open a PR about this? If you don't want to, I can open too.

onlined added a commit to onlined/qBittorrent that referenced this issue May 6, 2019
Chocobo1 pushed a commit to Chocobo1/qBittorrent that referenced this issue May 11, 2019
lordlethis added a commit to lordlethis/Clementine that referenced this issue May 31, 2019
This applies the fix qBittorrent used for this same issue:
qbittorrent/qBittorrent#9240,
so credit goes to those guys
hatstand pushed a commit to clementine-player/Clementine that referenced this issue Jul 13, 2019
* Fix blank window when restoring from systray

This applies the fix qBittorrent used for this same issue:
qbittorrent/qBittorrent#9240,
so credit goes to those guys

* Fix whitespace
@qbittorrent qbittorrent locked and limited conversation to collaborators Feb 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GUI GUI-related issues/changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants