Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODEEXT-239

Qt Widgets Application(Qt for Python) template has the wrong import

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 1.11.0
    • None

      The generated project template cannot be run because it has Ui_Widget instead of Ui_Mainwindow

      I attached a screenshot on how to generate the template
      How I built dependencies and ran the project:

      python3 -m venv .venv 
      source .venv/bin/activate.fish
      python3 -m pip install -r requirements.txt
      pyside6-project run
      
      /Users/orkun/qt_work/generated_projects/python_mainwindow/.venv/bin/python3 /Users/orkun/qt_work/generated_projects/python_mainwindow/mainwindow.py
      Traceback (most recent call last):
        File "/Users/orkun/qt_work/generated_projects/python_mainwindow/mainwindow.py", line 7, in <module>
          from ui_form import Ui_Widget
      ImportError: cannot import name 'Ui_Widget' from 'ui_form' (/Users/orkun/qt_work/generated_projects/python_mainwindow/ui_form.py)
      

        1. 2025-09-25_16-57.png
          213 kB
          Orkun Tokdemir
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            bencho Ben Cho
            orkun.tokdemir Orkun Tokdemir
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes