QT dialog.show() disappearing on version 0.28.x (Qt6)

Hi Matthias-

Reporting an issue seen on all my company's PCs with windows.
Legacy scripts that use Qt to generate dialog are seeing weird issue when ran on v0.28.x (v0.27 and below is OK).
The Qt dialog will start, but when you hover with your mouse on it, it's components will disappear. Next time you start the dialog none of the components will show, just the dialog frame.
If the last line below is changed from dialog.show() to dialog.exec_() then everything is fine.

I will try the same code at home to see if this a windows environment issue specific to my company.

Here is a short code that shows it:

dialog = pya.QDialog.new()
dialog.setWindowTitle("dialog")
layout = pya.QHBoxLayout(dialog)
dialog.setLayout(layout)
textBox = pya.QPlainTextEdit("test", dialog)
layout.addWidget(textBox)
dialog.show()

Comments

  • This issue also happening on my home PC, so not just in my company.
    My home PC windows version:
    Edition Windows 10 Home
    Version 21H2
    Installed on ‎2/‎5/‎2021
    OS build 19044.2728
    Experience Windows Feature Experience Pack 120.2212.4190.0

  • Hi,

    I see such an issue, but only when running scripts from the IDE and with the debugger on. I also do not see the effect when I open the dialog in modal mode (using exec_). Also in my case, when I close the IDE, the dialog starts behaving normal.

    Thing is, the debugger will interfere with events generate by Qt and routed via the abstract method stubs that are present in the Qt classes. Some events are disabled (specifically the paint events) in order to prevent nasty situations such as the debugger being caught in it's own paint events.

    In a production scenario the debugger should not be active, so I think that behavior is acceptable.

    Are these observations matching with yours?

    Matthias

  • Hi Matthias-

    Yes you're right, no issue after closing the IDE window. This didn't happen with previous releases but now that I know about the IDE window it's not an issue.

    Does IDE window has it's own object that I can use in order to close it? something like pya.Application.instance().ide_window().close()

    Thanks,

  • No, sorry. No such object and it does not really make sense - a debugger being closed by application it debugs?

  • Observation: when running 2.5d script on Windows using Klayout V0.28, it speeds the script significantly if the Macro window is closed (while the script is running)

  • Yes, that is another side effect of debugging. The debugger intercepts trace events which slows down execution.

    Matthias

  • When working on a 2.5d script, is there a workaround to have both the script running fast and not having to close and re-open the debugger window in each iteration?
    Thanks,

  • You can turn off debugging in the IDE. That has the same effect:

    On:

    Off:

    Matthias

Sign In or Register to comment.