Destroy qt.QPushButton

dfajtai
Thu, 16 May 2024 17:23:24 +0000
Development

I have successfully created a module based on the SimpleFilters module. It works fine if I have one “custom” filter. By this, I mean that there is only one element in the
combo box.

When I add more than one, I need to handle the switching between the different layouts. Emptying the layout is done by calling the destroy function. I implemented the same procedure in a class mimicking the capabilities of the FilterParameters class in a… bit duck-taped way.

It worked fine - until I tried to remove a qt.QPushButton type widget. Doing this completely crashes the Slicer, exiting with no trace of the error. Adding ‘try-catch’ can not catch the error. If I execute Slicer from a terminal, all I see is

Switch to module:  "Welcome"
Switch to module:  "CustomFilters"
Switch to module:  ""
Switch to module:  ""
error: [/local_data/Programs/Slicer-5.2.2-linux-amd64/bin/SlicerApp-real] exit abnormally - Report the problem.

6 posts - 3 participants