E5Gui/E5SideBar.py

changeset 5563
3e6e6d70c4ff
parent 5389
9b1c800daff3
child 5736
000ea446ff4b
equal deleted inserted replaced
5562:19f22f304e2c 5563:3e6e6d70c4ff
651 Private slot to handle a change of the focus. 651 Private slot to handle a change of the focus.
652 652
653 @param old reference to the widget, that lost focus (QWidget or None) 653 @param old reference to the widget, that lost focus (QWidget or None)
654 @param now reference to the widget having the focus (QWidget or None) 654 @param now reference to the widget having the focus (QWidget or None)
655 """ 655 """
656 self.__hasFocus = self.isAncestorOf(now) 656 if isinstance(now, QWidget):
657 if self.__autoHide and not self.__hasFocus and not self.isMinimized(): 657 self.__hasFocus = self.isAncestorOf(now)
658 self.shrink() 658 if self.__autoHide and not self.__hasFocus and \
659 elif self.__autoHide and self.__hasFocus and self.isMinimized(): 659 not self.isMinimized():
660 self.expand() 660 self.shrink()
661 elif self.__autoHide and self.__hasFocus and self.isMinimized():
662 self.expand()
661 663
662 def enterEvent(self, event): 664 def enterEvent(self, event):
663 """ 665 """
664 Protected method to handle the mouse entering this widget. 666 Protected method to handle the mouse entering this widget.
665 667

eric ide

mercurial