Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. FYI: pyside6-uic doesn't know that QOpenGLWidget has moved.
Qt 6.11 is out! See what's new in the release blog

FYI: pyside6-uic doesn't know that QOpenGLWidget has moved.

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 3 Posters 996 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sfjinla
    wrote on last edited by
    #1

    An FYI to people looking for this:
    Normally when you create python from a ui file, the head of the python script includes the
    necessary "import" statements for the material:

    from PySide6.QtCore import * # type: ignore
    from PySide6.QtGui import * # type: ignore
    from PySide6.QtWidgets import * # type: ignore

    However, if your ui file includes a QOpenGLWidget, please note that you need to manually add:

    from PySide6.QtOpenGLWidgets import * # type: ignore

    It appears that when QOpenGLWidget was moved from Widgets into QOpenGLWidgets, pyside-uic was not made aware of this.

    jsulmJ eyllanescE 2 Replies Last reply
    0
    • S sfjinla

      An FYI to people looking for this:
      Normally when you create python from a ui file, the head of the python script includes the
      necessary "import" statements for the material:

      from PySide6.QtCore import * # type: ignore
      from PySide6.QtGui import * # type: ignore
      from PySide6.QtWidgets import * # type: ignore

      However, if your ui file includes a QOpenGLWidget, please note that you need to manually add:

      from PySide6.QtOpenGLWidgets import * # type: ignore

      It appears that when QOpenGLWidget was moved from Widgets into QOpenGLWidgets, pyside-uic was not made aware of this.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @sfjinla You really should not include everything from a module" (*)! Include only what you really need.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      eyllanescE 1 Reply Last reply
      0
      • jsulmJ jsulm

        @sfjinla You really should not include everything from a module" (*)! Include only what you really need.

        eyllanescE Offline
        eyllanescE Offline
        eyllanesc
        wrote on last edited by
        #3

        @jsulm Unfortunately uic is the one that makes this type of imports.

        If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

        1 Reply Last reply
        0
        • S sfjinla

          An FYI to people looking for this:
          Normally when you create python from a ui file, the head of the python script includes the
          necessary "import" statements for the material:

          from PySide6.QtCore import * # type: ignore
          from PySide6.QtGui import * # type: ignore
          from PySide6.QtWidgets import * # type: ignore

          However, if your ui file includes a QOpenGLWidget, please note that you need to manually add:

          from PySide6.QtOpenGLWidgets import * # type: ignore

          It appears that when QOpenGLWidget was moved from Widgets into QOpenGLWidgets, pyside-uic was not made aware of this.

          eyllanescE Offline
          eyllanescE Offline
          eyllanesc
          wrote on last edited by
          #4

          @sfjinla It seems to me that it is a bug so it is advisable to report it

          If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved