[PySide] QtDesigner ???

Paolo De Stefani paolo at paolodestefani.it
Sun Apr 24 09:58:55 CEST 2022


Hi

I shrinked more all of my ui file so now everything is in 5 ui/py files

To create py files from ui i use this command in a windows batch file:

cd c:\PyWare\pyDBManager\Bug
REM create lib ui modules
"c:\windows\system32\forfiles.exe" /P "C:\PyWare\pyDBManager\Bug" /M 
*.ui /c "cmd /c c:\Python310\Scripts\pyside6-uic -o @fname.py @file"
pause

If i import from DBManagerMainWindowBad (line 33/34) running 
pyDBManager.py i get:

Traceback (most recent call last):
   File "c:\PyWare\pyDBManager\Bug\pyDBManager.py", line 161, in <module>
     window = MainWindow()
   File "c:\PyWare\pyDBManager\Bug\pyDBManager.py", line 56, in __init__
     self.ui.setupUi(self)
   File "c:\PyWare\pyDBManager\Bug\DBManagerMainWindowBad.py", line 171, 
in setupUi
     self.tab_widget_new_database.addTab(self.tab, "")
AttributeError: 'PySide6.QtWidgets.QHBoxLayout' object has no attribute 
'isEmpty'

If i import from DBManagerMainWindowGood everything is working

So what's wrong in DBManagerMainWindowBad.ui ???


Il 22/04/2022 00:03 Paolo De Stefani ha scritto:
> Il 21/04/2022 22:56 Cristián Maureira-Fredes ha scritto:
>> Hey,
>> 
>> it seems like your file got removed
>> due to a malware detection process.
>> 
>> Can you share your code using services like
>> pastebin.com dpaste.com linkode.org etc etc ?
> 
> In the zip archive there are text file, png icons, one .bat file
> I've uploaded that file here:
> 
> ftp://ftp.paolodestefani.it
> user: pyside at paolodestefani.it
> pwd: Pyside123!
> 
> 
>> 
>> In that case we can see the full extent of the problem.
>> 
>> As an alternative,
>> you can report a bug and share the zip file (or all the files)
>> to the issue, so it can be discussed there (you'd need a Qt account)
>> This is the platform to do that:
>> http://bugreports.qt.io/browse/PYSIDE
>> Make sure you select the 'pyside' project
>> and here you have more info:
>> https://wiki.qt.io/Qt_for_Python/Reporting_Bugs
> 
> Uh maybe is my mistake...
> Before reporting any bug is better that someone else check the code i 
> suppose
> 
>> 
>> 
>> Cheers
>> 
>> On 4/21/22 21:46, Paolo De Stefani wrote:
>>> Il 20/04/2022 22:59 Cristián Maureira-Fredes ha scritto:
>>>> Hey,
>>>> 
>>>> (remember to reply to the list, so other folks can read the 
>>>> discussion,
>>>> I'm adding the ML on CC to jump back to the topic)
>>> 
>>> OPS... Sorry
>>> 
>>>> 
>>>> Maybe you are hitting https://bugreports.qt.io/browse/PYSIDE-1561
>>>> 
>>> 
>>> It seems a diffrerent issue
>>> 
>>> 
>>>> Can you share more information regarding how you are using the 
>>>> generated
>>>> ui file?
>>>> 
>>> 
>>> It looks like a QtDesigner problem or uic problem for me BUT i'm not 
>>> a professional programmer
>>> 
>>> I created a small script that can show the problem. Simply 
>>> comment/uncomment line 33/34
>>> 
>>> #from Ui.DBManagerMainWindowGood import Ui_DBManagerMainWindow
>>> from Ui.DBManagerMainWindowBad import Ui_DBManagerMainWindow
>>> 
>>> .ui files are included and you can see that the only difference 
>>> between the 2 is a label and line edit added in the bad one. Of 
>>> course both can be previewed in QtDesigner without any problem
>>> 
>>> 

-- 
Paolo De Stefani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DBManagerMainWindowBad.py
Type: text/x-python
Size: 15563 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220424/dbee75b7/attachment-0003.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DBManagerMainWindowBad.ui
Type: text/xml
Size: 10193 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220424/dbee75b7/attachment-0002.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DBManagerMainWindowGood.py
Type: text/x-python
Size: 13564 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220424/dbee75b7/attachment-0004.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DBManagerMainWindowGood.ui
Type: text/xml
Size: 8188 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220424/dbee75b7/attachment-0003.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyDBManager.py
Type: text/x-python
Size: 6939 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220424/dbee75b7/attachment-0005.py>


More information about the PySide mailing list