Re: QTabWidget tabBar refresh?
Maurizio Berti <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <CAPn+-XRPajLkC345O83FMN1_5hpcW3BBHajP5POZG_QVQfisSw@mail.gmail.com> |
Il giorno mar 7 mag 2019 alle ore 20:11 Matic Kukovec < [email protected]> ha scritto: > Sure, here is my working example, as it is a bit more code. > > Thanks again > I just had a quick look at your code, and it seems like the only issue is in the Type argument of the QMouseEvent you create at line 113: as the doc reports, "The type parameter must be one of QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseButtonDblClick, or QEvent::MouseMove"; so, using PolishRequest is wrong: the QTabBar wouldn't recognize it and then wouldn't react to it in the right way. After changing it to MouseMove, it works as expected. The only thing you might need after this is to add a tabBar.update() after the drag.exec_(), but it might be even better to do an unpolish/polish of the style: self.style().unpolish(tabBar) self.style().polish(tabBar) Hope this helps. Maurizio -- È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi http://www.jidesk.net _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt