[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: pyuic6 bug
From: Ian Rodriguez <ianlemuelr () gmail ! com>
Date: 2021-03-06 14:00:46
Message-ID: CALf7+HP+ZcDPNDLGFuqViKY32hpYgYB5-Mb8TJYp=UtGn8qOZw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/related)]
[Attachment #4 (multipart/alternative)]
I am using pyqt6 (6.0.2) and qt designer from pyqt5-tools. As of this
writing, I have updated modules by pip install --upgrade.
I am compiling during runtime using uic.compileUI.
I set the layoutSizeConstraint to any value (if I don't touch the combobox,
it is fine) and this error occurs. Even returning it to the previous value
does not work. It seems that QtWidgets.QLayout.SizeConstraint is not used.
I have tried changing
<enum>QLayout::SetMinimumSize</enum>
to
<enum>QLayout::SizeConstraint::SetMinimumSize</enum>
and it works, but I assume that pyuic6 should translate it properly.
Thanks.
[image: image.png]
[Attachment #7 (text/html)]
<div dir="ltr"><div dir="ltr"><div dir="ltr">I am using pyqt6 (6.0.2) and qt designer \
from pyqt5-tools. As of this writing, I have updated modules by pip install \
--upgrade.<div>I am compiling during runtime using uic.compileUI.<br>I set the \
layoutSizeConstraint to any value (if I don't touch the combobox, it is fine) and \
this error occurs. Even returning it to the previous value does not work. It seems \
that QtWidgets.QLayout.SizeConstraint is not used.</div><div><br></div><div>I have \
tried changing</div><div><div \
style="color:rgb(51,51,51);background-color:rgb(253,246,227);font-family:Consolas,"Courier \
New",monospace;font-size:16px;line-height:22px;white-space:pre"><<span \
style="color:rgb(38,139,210)">enum</span>>QLayout::SetMinimumSize</<span \
style="color:rgb(38,139,210)">enum</span>></div><div \
style="color:rgb(51,51,51);background-color:rgb(253,246,227);font-family:Consolas,"Courier \
New",monospace;font-size:16px;line-height:22px;white-space:pre">to<br></div><div \
style="color:rgb(51,51,51);background-color:rgb(253,246,227);font-family:Consolas,"Courier \
New",monospace;font-size:16px;line-height:22px;white-space:pre"><div \
style="line-height:22px"><<span \
style="color:rgb(38,139,210)">enum</span>>QLayout::SizeConstraint::SetMinimumSize</<span \
style="color:rgb(38,139,210)">enum</span>></div><div style="line-height:22px">and \
it works, but I assume that pyuic6 should translate it properly.</div><div \
style="line-height:22px">Thanks.</div></div><img src="cid:ii_klxsfcsx2" \
alt="image.png" width="490" height="240"><br></div></div></div></div>
["image.png" (image/png)]
["PyClicker.ui" (application/octet-stream)]
["ui_PyClicker.py" (text/x-python)]
# Form implementation generated from reading ui file 'ui/PyClicker.ui'
#
# Created by: PyQt6 UI code generator 6.0.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtCore, QtGui, QtWidgets
class Ui_PyClicker(object):
def setupUi(self, PyClicker):
PyClicker.setObjectName("PyClicker")
PyClicker.resize(488, 546)
self.centralwidget = QtWidgets.QWidget(PyClicker)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, \
QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) \
self.horizontalLayout.addItem(spacerItem) self.addButton = \
QtWidgets.QPushButton(self.centralwidget) self.addButton.setObjectName("addButton")
self.horizontalLayout.addWidget(self.addButton)
self.removeButton = QtWidgets.QPushButton(self.centralwidget)
self.removeButton.setObjectName("removeButton")
self.horizontalLayout.addWidget(self.removeButton)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.scrollArea = QtWidgets.QScrollArea(self.centralwidget)
self.scrollArea.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
self.scrollArea.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setAlignment(QtCore.Qt.Alignment.AlignLeading|QtCore.Qt.Alignment.AlignLeft|QtCore.Qt.Alignment.AlignTop)
self.scrollArea.setObjectName("scrollArea")
self.scrollAreaWidgetContents = QtWidgets.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 464, 434))
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_3.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.pushButton = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
self.pushButton.setObjectName("pushButton")
self.verticalLayout_3.addWidget(self.pushButton)
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
self.verticalLayout_2.addWidget(self.scrollArea)
self.verticalLayout.addLayout(self.verticalLayout_2)
PyClicker.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(PyClicker)
self.menubar.setGeometry(QtCore.QRect(0, 0, 488, 26))
self.menubar.setObjectName("menubar")
PyClicker.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(PyClicker)
self.statusbar.setObjectName("statusbar")
PyClicker.setStatusBar(self.statusbar)
self.retranslateUi(PyClicker)
QtCore.QMetaObject.connectSlotsByName(PyClicker)
def retranslateUi(self, PyClicker):
_translate = QtCore.QCoreApplication.translate
PyClicker.setWindowTitle(_translate("PyClicker", "MainWindow"))
self.addButton.setText(_translate("PyClicker", "Add"))
self.removeButton.setText(_translate("PyClicker", "Remove"))
self.pushButton.setText(_translate("PyClicker", "PushButton"))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic