[PyQt] QTabWidget's tab bar behavior?
Matic Kukovec
kukovecmatic at hotmail.com
Sat May 25 19:17:10 BST 2019
Hi guys,
In a standard QTabWidget when moving the tabs, the behavior is like this:
[cid:7d8c1ac9-04b1-4350-b2d7-fdabff771b69]
I made a QTabWidget with a custom tabBar in which I manually add a QGroupBox with QLabel
that acts as a close button with self.setTabButton(index, QTabBar.RightSide, groupbox).
This works great except that it changes the behavior of the mouse-dragging of tabs like so:
[cid:9c0ec5b9-3a3f-4f1c-a3eb-5166abe45a55]
I don't exactly know what caused this? I wish to get the standard behaviour back, can anyone help?
The code is in the attachment.
Thanks,
Matic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190525/c00a013e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2019-05-25_20-05-15.gif
Type: image/gif
Size: 54169 bytes
Desc: 2019-05-25_20-05-15.gif
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190525/c00a013e/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2019-05-25_20-02-47.gif
Type: image/gif
Size: 85414 bytes
Desc: 2019-05-25_20-02-47.gif
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190525/c00a013e/attachment-0003.gif>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qtabwidget_test.py
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190525/c00a013e/attachment-0001.ksh>
More information about the PyQt
mailing list