Menu

#130 Inheriting from UILoadable widget fails

Jan15
resolved
None
bug
2015-03-30
2014-12-01
No

The following code will fail:

from taurus.external.qt import Qt
from taurus.qt.qtgui.util.ui import UILoadable

@UILoadable
class BaseWidget(Qt.QWidget):

    def __init__(self, parent=None):
        super(BaseWidget, self).__init__(parent)
        self.loadUi()

@class MyWidget(BaseWidget):
    pass

app = Qt.QApplication([])
w = MyWidget()
w.show()
app.exec_()

because loadUi will look for a UI file called MyWidget.ui instead of BaseWidget.ui.

Discussion

  • Carlos Pascual

    Carlos Pascual - 2015-01-09
    • status: active --> resolved
     
  • Carlos Pascual

    Carlos Pascual - 2015-01-09

    patch sent by Tiago to devel list applied

     
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/292/

    Can't be converted:

    • _category: taurus-qt
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.