Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What does python_qt_binding.loadUi's 3rd arg do in PyQt binding?

For example, in rqt_bag loadUi takes a python dictionary as its 3rd arg like this:

ui_file = os.path.join(rp.get_path('rqt_bag'), 'resource', 'bag_widget.ui')
loadUi(ui_file, self, {'BagGraphicsView': BagGraphicsView})

Now tracking back loadUi, what PySide binding does makes sense looking at source code -- it uses dictionary "as dictionary":

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PySide.QtUiTools import QUiLoader
    from PySide.QtCore import QMetaObject
        :
        def createWidget(self, class_name, parent=None, name=''):
            # don't create the top-level widget, if a base instance is set
            if self._base_instance is not None and parent is None:
                return self._base_instance

            if class_name in self._custom_widgets:
                widget = self._custom_widgets[class_name](parent)

But what about PyQt binding? Just ignoring?

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PyQt4 import uic
    return uic.loadUi(uifile, baseinstance=baseinstance)

What does python_qt_binding.loadUi's 3rd arg do in PyQt binding?

For example, in rqt_bag loadUi takes a python dictionary as its 3rd arg like this:

ui_file = os.path.join(rp.get_path('rqt_bag'), 'resource', 'bag_widget.ui')
loadUi(ui_file, self, {'BagGraphicsView': BagGraphicsView})

Now tracking back loadUi, what PySide binding does makes sense looking at source code -- it uses dictionary "as dictionary":

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PySide.QtUiTools import QUiLoader
    from PySide.QtCore import QMetaObject
        :
        def createWidget(self, class_name, parent=None, name=''):
            # don't create the top-level widget, if a base instance is set
            if self._base_instance is not None and parent is None:
                return self._base_instance

            if class_name in self._custom_widgets:
                widget = self._custom_widgets[class_name](parent)

But what about PyQt binding? Just ignoring?

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PyQt4 import uic
    return uic.loadUi(uifile, baseinstance=baseinstance)

Just ignoring? If so, what's the purpose of letting PySide binding have 3rd arg?

What does python_qt_binding.loadUi's 3rd arg do in PyQt binding?

For example, in rqt_bag loadUi takes a python dictionary as its 3rd arg like this:

ui_file = os.path.join(rp.get_path('rqt_bag'), 'resource', 'bag_widget.ui')
loadUi(ui_file, self, {'BagGraphicsView': BagGraphicsView})

Now tracking back loadUi, what PySide binding does makes sense looking at source code -- it uses dictionary "as dictionary":

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PySide.QtUiTools import QUiLoader
    from PySide.QtCore import QMetaObject
        :
        def createWidget(self, class_name, parent=None, name=''):
            # don't create the top-level widget, if a base instance is set
            if self._base_instance is not None and parent is None:
                return self._base_instance

            if class_name in self._custom_widgets:
                widget = self._custom_widgets[class_name](parent)

But what about PyQt binding?

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PyQt4 import uic
    return uic.loadUi(uifile, baseinstance=baseinstance)

Just ignoring? If so, what's the purpose of letting PySide binding have 3rd arg?

What does python_qt_binding.loadUi's 3rd arg do in PyQt binding?

For example, in rqt_bag loadUi takes a python dictionary as its 3rd arg like this:

ui_file = os.path.join(rp.get_path('rqt_bag'), 'resource', 'bag_widget.ui')
loadUi(ui_file, self, {'BagGraphicsView': BagGraphicsView})

Now tracking back loadUi, what PySide binding does makes sense looking at source code -- it uses dictionary "as dictionary":

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PySide.QtUiTools import QUiLoader
    from PySide.QtCore import QMetaObject
        :
        def createWidget(self, class_name, parent=None, name=''):
            # don't create the top-level widget, if a base instance is set
            if self._base_instance is not None and parent is None:
                return self._base_instance

            if class_name in self._custom_widgets:
                widget = self._custom_widgets[class_name](parent)

But what about PyQt binding?

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PyQt4 import uic
    return uic.loadUi(uifile, baseinstance=baseinstance)

Just ignoring? If so, what's the purpose of letting PySide binding have 3rd arg?

What does python_qt_binding.loadUi's 3rd arg do in PyQt binding?

For example, in rqt_bag loadUi takes a python dictionary as its 3rd arg like this:

ui_file = os.path.join(rp.get_path('rqt_bag'), 'resource', 'bag_widget.ui')
loadUi(ui_file, self, {'BagGraphicsView': BagGraphicsView})

Now tracking back loadUi, what PySide binding does makes sense looking at source code -- it uses dictionary "as dictionary":

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PySide.QtUiTools import QUiLoader
    from PySide.QtCore import QMetaObject
        :
        def createWidget(self, class_name, parent=None, name=''):
            # don't create the top-level widget, if a base instance is set
            if self._base_instance is not None and parent is None:
                return self._base_instance

            if class_name in self._custom_widgets:
                widget = self._custom_widgets[class_name](parent)

But what about PyQt binding?

def loadUi(uifile, baseinstance=None, custom_widgets=None):
    from PyQt4 import uic
    return uic.loadUi(uifile, baseinstance=baseinstance)

Just ignoring? If so, what's the purpose of letting PySide binding have 3rd arg?