Browse Source

Fix for "wrapped C/C++ object of type PixmapDial has been deleted"

tags/1.9.5
falkTX 10 years ago
parent
commit
a2deca37cc
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      source/widgets/pixmapdial.py

+ 4
- 2
source/widgets/pixmapdial.py View File

@@ -252,10 +252,12 @@ class PixmapDial(QDial):
return QSize(self.fPixmapBaseSize, self.fPixmapBaseSize)

def changeEvent(self, event):
if event.type() == QEvent.EnabledChange:
QTimer.singleShot(0, self.slot_updatePixmap)
QDial.changeEvent(self, event)

# Force pixmap update if enabled state changes
if event.type() == QEvent.EnabledChange:
self.setPixmap(int(self.fPixmapNum))

def enterEvent(self, event):
self.fIsHovered = True
if self.fHoverStep == self.HOVER_MIN:


Loading…
Cancel
Save