FreeCAD WebAssembly development snapshot
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled
This commit is contained in:
22
src/Ext/freecad/UiTools.py
Normal file
22
src/Ext/freecad/UiTools.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# (c) 2021 Werner Mayer LGPL
|
||||
|
||||
from PySide import QtUiTools
|
||||
import FreeCADGui as Gui
|
||||
|
||||
|
||||
class QUiLoader(QtUiTools.QUiLoader):
|
||||
"""
|
||||
This is an extension of Qt's QUiLoader to also create custom widgets
|
||||
"""
|
||||
def __init__(self, arg = None):
|
||||
super(QUiLoader, self).__init__(arg)
|
||||
self.ui = Gui.PySideUic
|
||||
|
||||
def createWidget(self, className, parent = None, name = ""):
|
||||
widget = self.ui.createCustomWidget(className, parent, name)
|
||||
if not widget:
|
||||
widget = super(QUiLoader, self).createWidget(className, parent, name)
|
||||
return widget
|
||||
|
||||
Reference in New Issue
Block a user