<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
<div>Il giorno mar 7 mag 2019 alle ore 20:11 Matic Kukovec <<a href="mailto:kukovecmatic@hotmail.com">kukovecmatic@hotmail.com</a>> ha scritto:</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div>Sure, here is my working example, as it is a bit more code.</div>
<div><br>
</div>
<div>Thanks again</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>
<div><br>
</div>
<div>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.<br>
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:</div>
<div><br>
</div>
<div>
<div><font face="monospace, monospace">        self.style().unpolish(tabBar)</font></div>
<div><font face="monospace, monospace">        self.style().polish(tabBar)</font></div>
</div>
<div><br>
</div>
</div>
Hope this helps.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Maurizio</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><br>
</div>
</div>
</div>
</div>
</div>
</div>
Thanks Mauricio, works like a charm!<br>
</div>
</body>
</html>