PySide2: modal QFileDialog seems to ignore call to accept()

18 views
Skip to first unread message

Martin Chatterjee

unread,
Mar 8, 2018, 7:12:44 AM3/8/18
to python_in...@googlegroups.com
Hey there,

I stumbled over this issue while writing tests for some UI code.
I want to display a QFileDialog modally and then automatically close it with a few seconds delay by calling accept() through a QTimer.

This does work as expected in PySide -- however it does not work anymore in PySide2.

In this Github Gist you can find a minimal repro script and more detailed explanation in the comments.

Does this ring a bell for anyone? 
If anybody could have a quick look and maybe tell me what I'm doing wrong (or suggest a workaround) that woud be greatly appreciated...
Thanks in advance!

Cheers, Martin


BTW, I tested under Windows 10.

It works as expected in:
    - Standalone Python 2.7 + PySide
    - Maya 2016 SP 6 (  --> PySide)

It does not work in:
    - Maya 2017 U4 ( --> PySide2)
    - Maya 2018 U2 ( --> PySide2)


--
       Martin Chatterjee

 
[ Freelance Technical Director ]
[   http://www.chatterjee.de   ]

Reply all
Reply to author
Forward
0 new messages