Skip to content

Commit fb68cfc

Browse files
authored
Merge pull request #89 from hsorby/main
Add new widget logspinbox.
2 parents b8d36ca + 136918c commit fb68cfc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/cmlibs/widgets/logspinbox.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import math
2+
3+
from PySide6 import QtWidgets
4+
5+
6+
class LogSpinBox(QtWidgets.QDoubleSpinBox):
7+
def __init__(self, parent=None):
8+
super().__init__(parent)
9+
10+
def stepBy(self, steps):
11+
current = self.value()
12+
self.setValue(current * math.pow(10, steps))

0 commit comments

Comments
 (0)