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

Line 62 in uiparser.py has an error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.2.0
    • PySide
    • None
    • All

    Description

      The error happens when I am using the `loadUi` module which I import from PyQt6.uic .

      The first time when I used the module, the error read `AttributeError: type object 'Qt' has no attribute 'AlignHCenter'`. The fix for this problem was changing Line 62 in the uiparser.py from

      `align = getattr(QtCore.Qt, qt_align)` to `align = getattr(QtCore.Qt.AlignmentFlag, qt_align)` .

      Appending `AlignmentFlag` to the `QtCore.Qt` fixed the issue for me, and I have been able to use the module without issue since. 

      I just thought this is something important to fix, especially when you are using the Designer app to do most of the layouts and then you want to access it programmatically later.

      Thank you for your time, and hope to hear about updates on this.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            superbluestar Nicholas Matanga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes