I would hope since value/setValue are forward/reverse functions that they
are consistent (both int).  But you never know.

On the other hand numsteps is not defined as int or a float, and I don't
know what that means in this language but int/5 can be whole number or a
float and I don't know what this language does.

C/C++ would always take int/5 == another int, but int/5.0 will be promoted
to a float, and languages without those sort of type rules may be vague
about what type numsteps is defined as and ends up as.

In c/c++ this code would work to convert the result to an int, no matter
which of the 2 values is not an int.

h.setValue((int)(h.value() - numsteps))

In some other languages it might be necessary to use a function int(
h.value() - numsteps) to convert it.




On Thu, May 26, 2022 at 8:18 AM stan via users <
users@lists.fedoraproject.org> wrote:

> On Wed, 25 May 2022 20:20:37 -0500
> "Steven P. Ulrick" <meow8...@gmail.com> wrote:
>
> > Anyway, here is the output from the terminal:
> >
> > qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence:
> > 20209, resource id: 14681426, major code: 40 (TranslateCoords), minor
> > code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow),
> > sequence: 43350, resource id: 14681466, major code: 40
> > (TranslateCoords), minor code: 0 Traceback (most recent call last):
> >    File "/usr/lib/python3.10/site-packages/puddlestuff/tagmodel.py",
> > line 2483, in wheelEvent
> >      h.setValue(h.value() - numsteps)
> > TypeError: setValue(self, int): argument 1 has unexpected type 'float'
> > Traceback (most recent call last):
> >    File "/usr/lib/python3.10/site-packages/puddlestuff/tagmodel.py",
> > line 2483, in wheelEvent
> >      h.setValue(h.value() - numsteps)
> > TypeError: setValue(self, int): argument 1 has unexpected type 'float'
> >
> > Yes, it does appear to be the same issue that was reported on
> > Bugzilla. I have added my comment to that bug, along with the above
> > quoted output.
> >
> > Still, if anyone has any ideas, I'm all ears. I have attempted to
> > install puddletag from GIT. It installs fine, but it won't run... But
> > that is a subject for another thread. I hesitate to bring that here,
> > until I have that same issue with other Python based applications on
> > Fedora 36.
>
> So, the problem is in this function,
>
>     def wheelEvent(self, e):
>         h = self.horizontalScrollBar()
>         if not self.verticalScrollBar().isVisible() and h.isVisible():
>             numsteps = e.angleDelta().y() / 5
>             h.setValue(h.value() - numsteps)       <--------  here
>             e.accept()
>         else:
>             QTableView.wheelEvent(self, e)
>
> in the class
> class TagTable(QTableView):
>
> which inherits from the class QTableView in PyQt5.QtWidgets.
>
> All that is to say, if my analysis is correct, that the problem is
> probably in PyQt5.QtWidgets QTableView where the horizontalScrollBar
> function is defined.  It probably has an error in the value function,
> defaulting to a float instead of an int.  I looked for the package with
> this function to follow up, but a quick search didn't find it.  Qt5 is
> huge!  And I was in a hurry.
>
> You might put this in the bugzilla, or ask if you can move it over to
> PyQt5. python3-qt5?  qt5-???
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> Do not reply to spam on the list, report it:
> https://pagure.io/fedora-infrastructure
>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to