Skip to content

Commit

Permalink
Prevent dset info highlighting when circling
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsebgosselin committed May 16, 2018
1 parent c2f716c commit d552141
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gwhat/widgets/spinboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

# ---- Imports: Third Parties

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QApplication, QDoubleSpinBox, QFileDialog,
QGridLayout, QListWidget, QMenu, QMessageBox,
QStyle, QToolButton, QWidget, QSpinBox,
Expand All @@ -29,6 +30,8 @@ def __init__(self, model=None):
self.setValue(0)
self.setWrapping(True)
self.lineEdit().setReadOnly(True)
self.valueChanged.connect(
self.lineEdit().deselect, Qt.QueuedConnection)

@property
def model(self):
Expand Down Expand Up @@ -64,8 +67,8 @@ def textFromValue(self, value):
if __name__ == '__main__':
app = QApplication(sys.argv)

model = {'test': 'patate', 'test2': 'orange'}
text_sp = DictSpinBox(model)
model = ['test', 'patate', 'test2', 'orange']
text_sp = StrSpinBox(model)
text_sp.show()

sys.exit(app.exec_())

0 comments on commit d552141

Please sign in to comment.