pyapp-kit / superqt

Missing widgets and components for Qt-python
https://pyapp-kit.github.io/superqt/
BSD 3-Clause "New" or "Revised" License
210 stars 38 forks source link

Python 3.10 TypeError on rangeChanged for QLabeledRangeSlider #115

Closed andrewb435 closed 2 years ago

andrewb435 commented 2 years ago

There seems to be some kind of type mismatch in expected signal values in the rangeChanged with Python 3.10. When loading a UI with a QLabeledRangeSlider, Python exits with code 134 and the message 'TypeError: rangeChanged(self, int, int).emit(): argument 1 has unexpected type 'float''

Steps to reproduce the behavior:

  1. Create a python 3.10 environment
  2. Import PyQT5 and superqt
  3. Create a UI with a QLabeledRangeSlider

Desktop (please complete the following information):

tlambert03 commented 2 years ago

can you tell me how you installed pyqt and exactly what version you have?

andrewb435 commented 2 years ago

PyQT5 was installed both in an anaconda venv and via pip3 (root and user). I've tried PyQT5 5.15.2 and 5.15.7 with the same symptoms.

gordon-n-stevenson commented 2 years ago

I had the same issue - which had the TypeError as above at setRange. Then added in the pull request of #111 which resolved.

self.focaldepth_field = QLabeledRangeSlider(Qt.Orientation.Horizontal) self.focaldepth_field.setRange(0,80) self.focaldepth_field.setValue(tuple(focaldepth_val))

tlambert03 commented 2 years ago

thanks @gordon-n-stevenson ... just waiting for a response to my request for a test there, and then can merge it