python - Hide window from taskbar -


i'm trying minimize window tray, seems refuses hide taskbar. i've spent little time , distilled problem code down this. it's not mcuh i'm wondering if need else hide app tray in windows 7.

import sys, os pyqt4 import uic  pyqt4.qtgui import qmainwindow, qapplication  class myclass(qmainwindow):     def __init__(self, parent = none):         qmainwindow.__init__(self, parent)         self.ui = uic.loadui(os.path.join("gui", "timetrackerclientgui.ui"), self)     def hideevent(self, event):         self.hide()     def showevent(self, event):         self.show()  if __name__ == '__main__':     app = qapplication(sys.argv)     wnd = myclass()     wnd.show()     app.exec_() 

it seems application icon hide 1 pops up, if click taskbar icon multiple times can these 2 icons flickering, looks kind of splitsecond before first 1 hides:

alt text

it took quite ugly hack working here's final code if interested, ph platform-specific module, can use platform.name or similar function instead:

def hideevent(self, event):     self.hide()     if ph.is_windows():         self.hidden = true         self.setwindowflags(qt.tooltip) def showevent(self, event):     if ph.is_windows() , self.hidden:         self.setwindowflags(qt.window)         self.hidden = false     self.show() 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -