Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-3185

Incorrect QOpenGLFunctions.glVertexAttribPointer type hint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 6.9.2
    • Type hints
    • None
    • All

      QOpenGLFunctions.glVertexAttribPointer takes a Shiboken.VoidPtr for the ptr attribute but the type hints say it takes an int.

      If you try calling this function with an int it raises an exception.

      The simple solution is to change the type hint to match the behaviour.

       

      # Current (incorrect) type hint
      def glVertexAttribPointer(self, indx: int, size: int, type: int, normalized: int, stride: int, ptr: int, /) -> None: ...
      
      # Correct type hint
      def glVertexAttribPointer(self, indx: int, size: int, type: int, normalized: int, stride: int, ptr: Shiboken.VoidPtr, /) -> None: ... 

       

        For Gerrit Dashboard: PYSIDE-3185
        # Subject Branch Project Status CR V

            crmaurei Cristian Maureira-Fredes
            gentlegiantjgc J C
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change