[PyQt] Filtering Designer's widget box via QDesignerWidgetBoxInterface

Kyle Altendorf sda at fstab.net
Thu Sep 15 20:48:09 BST 2016


Also posted at:
https://forum.qt.io/topic/71253/filtering-designer-s-widget-box-via-qdesignerwidgetboxinterface

I have several custom widgets I have been using in Designer that could 
be used by users of my application without having to write any code. 
Most of the widgets listed in Designer's widget box need code behind 
them to be useful and I would like to hide those. I have attempted to 
write the widget box's configuration to a file, load that and remove a 
few example items, write that to a file, then load that second file back 
into the widget box... load() returns true but I see no change in the 
widget box.

Code: 
https://github.com/altendky/st/commit/27a48439273ccfbfafd572e477c92ad55df8606f
Designer output: 
https://gist.github.com/altendky/490c7f7d14377e50fa7bb266612de24d

Any obvious errors? Thoughts on something else to try? Thanks for your 
time.

Cheers,
-kyle


More information about the PyQt mailing list