当前位置: 首页>>代码示例>>Python>>正文


Python uic.loadUi方法代码示例

本文整理汇总了Python中PyQt5.uic.loadUi方法的典型用法代码示例。如果您正苦于以下问题:Python uic.loadUi方法的具体用法?Python uic.loadUi怎么用?Python uic.loadUi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.uic的用法示例。


在下文中一共展示了uic.loadUi方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, username):
        QWidget.__init__(self)
        uic.loadUi("UI/rawscripts.ui", self)
        self.setWindowTitle("Script Select Menu")
        self.loggedinas.setText("Logged in as: %s" % username)
        self.treeWidget.currentItemChanged.connect(self.changeSelected)
        self.startEditing.clicked.connect(self.startVideoEditor)
        self.refreshScripts.clicked.connect(self.refreshScriptsRequest)
        self.flagQuality.clicked.connect(lambda : self.flagScript("QUALITY"))
        self.addscript.clicked.connect(self.addScriptFromURL)
        self.update_table.connect(self.updateColors)
        self.add_url_response.connect(self.addedNewScript)
        self.reset_editing_status.connect(self.resetEditingStatus)
        self.timer = QtCore.QTimer(self)
        self.timer.timeout.connect(self.updateTime)
        self.timer.start(4000)
        self.currentScriptSelected = None
        self.isEditing = False 
开发者ID:HA6Bots,项目名称:Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader,代码行数:20,代码来源:rawscriptsmenu.py

示例2: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, parent, view):
        super(Annotation, self).__init__(parent)

        self.parent = parent
        self.view = view
        self.oshow = super(Annotation, self).show

        root = os.path.dirname(os.path.realpath(__file__))
        self.ui = loadUi(os.path.join(root, 'annotation.ui'), baseinstance=self)

        #        self.ei = ImportsEventFilter(plugin, self.ui.treeWidgetImports)

        self.ei = treeEventFilter(view, self.ui.treeWidget)
        self.ui.treeWidget.installEventFilter(self.ei)

        self.initUI() 
开发者ID:amimo,项目名称:dcc,代码行数:18,代码来源:HexViewMode.py

示例3: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, videoscript):
        QWidget.__init__(self)
        uic.loadUi("UI/videoeditor.ui", self)
        global currentPublishMenu
        currentPublishMenu = self
        self.videoScript = videoscript
        self.thumbnailPath = "%s/video%s.png" % (thumbnailFolder, self.videoScript.scriptno)
        self.bigThumbView = False
        self.scriptWrapper = self.videoScript.scriptWrapper
        self.fistTimeUpdateDisplay()
        self.generateTags.clicked.connect(self.generateGoogleTags)
        self.tags.append(standard_tags)
        self.loadThumbnails()
        self.usethumbnail.clicked.connect(self.selectThumbnail)
        clickable(self.thumbnailarea).connect(self.toggleFullScreenThumbnail)
        self.openthumbnailfolder.clicked.connect(self.openThumbnailPath)
        self.genVid.clicked.connect(self.sendToVideoGenerator)
        self.openeditor.clicked.connect(self.openVideoEditor)
        self.upload_success_true.connect(self.uploadSuccess)
        self.upload_success_false.connect(self.uploadFail)
        self.safeClose = False
        self.timer = QTimer()
        self.timer.timeout.connect(self.updateDisplay)
        self.timer.start(3000) 
开发者ID:HA6Bots,项目名称:Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader,代码行数:26,代码来源:publishmenu.py

示例4: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, parent=None):
        super(RTTView, self).__init__(parent)
        
        uic.loadUi('RTTView.ui', self)

        self.initSetting()

        self.initQwtPlot()

        self.rcvbuff = b''
        
        self.tmrRTT = QtCore.QTimer()
        self.tmrRTT.setInterval(10)
        self.tmrRTT.timeout.connect(self.on_tmrRTT_timeout)
        self.tmrRTT.start()

        self.tmrRTT_Cnt = 0 
开发者ID:XIVN1987,项目名称:JRTTView,代码行数:19,代码来源:RTTView.py

示例5: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self):
        QtWidgets.QWidget.__init__(self)
        uic.loadUi("window.ui", self)
        self.scene = myScene(0, 0, 561, 581)
        self.scene.win = self
        self.view.setScene(self.scene)
        self.image = QImage(561, 581, QImage.Format_ARGB32_Premultiplied)
        self.image.fill(col_zero)
        self.lock.clicked.connect(lambda: lock(self))
        self.erase.clicked.connect(lambda: clean_all(self))
        self.paint.clicked.connect(lambda: fill_with_seed(self))
        self.addpoint.clicked.connect(lambda: add_point_by_btn(self))
        self.pixel.clicked.connect(lambda: set_flag_zat(self))
        self.addcircle.clicked.connect(lambda: set_flag_cir(self))
        self.edges = []
        self.point_now = None
        self.point_lock = None

        self.pen = QPen(col_one)
        self.delay.setChecked(False) 
开发者ID:Panda-Lewandowski,项目名称:Computer-graphics,代码行数:22,代码来源:lab6.py

示例6: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self):
        QtWidgets.QWidget.__init__(self)
        uic.loadUi("window.ui", self)
        self.scene = Scene(0, 0, 561, 581)
        self.scene.win = self
        self.view.setScene(self.scene)
        self.image = QImage(561, 581, QImage.Format_ARGB32_Premultiplied)
        self.image.fill(Qt.white)
        self.bars.clicked.connect(lambda : set_bars(self))
        self.erase.clicked.connect(lambda: clean_all(self))
        self.paint.clicked.connect(lambda: clipping(self))
        self.rect.clicked.connect(lambda: set_rect(self))
        self.ect.clicked.connect(lambda: add_bars(self))
        self.lines = []
        self.clip = None
        self.point_now = None
        self.input_bars = False
        self.input_rect = False
        self.pen = QPen(red) 
开发者ID:Panda-Lewandowski,项目名称:Computer-graphics,代码行数:21,代码来源:lab7.py

示例7: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self):
        QtWidgets.QWidget.__init__(self)
        uic.loadUi("window.ui", self)
        self.scene = QGraphicsScene(0, 0, 711, 601)
        self.scene.win = self
        self.view.setScene(self.scene)
        self.image = QImage(710, 600, QImage.Format_Alpha8)
        self.image.fill(black)
        self.pen = QPen(black)
        self.draw.clicked.connect(lambda: draw(self))
        self.dial_x.valueChanged.connect(lambda: draw(self))
        self.dial_y.valueChanged.connect(lambda: draw(self))
        self.dial_z.valueChanged.connect(lambda: draw(self))
        self.funcs.addItem("cos(x) * sin(z)")
        self.funcs.addItem("2 * cos(x * z)")
        self.funcs.addItem("exp(sin(sqrt(x^2 + z^2)))")
        self.funcs.addItem("x^2 / 20 + z^2 / 20")
        self.funcs.addItem("|sin(x) * sin(z)|") 
开发者ID:Panda-Lewandowski,项目名称:Computer-graphics,代码行数:20,代码来源:lab10.py

示例8: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self):
        QtWidgets.QWidget.__init__(self)
        uic.loadUi("window.ui", self)
        self.scene = myScene(0, 0, 561, 581)
        self.scene.win = self
        self.view.setScene(self.scene)
        self.image = QImage(561, 581, QImage.Format_ARGB32_Premultiplied)
        self.image.fill(col_zero)
        self.lock.clicked.connect(lambda: lock(self))
        self.erase.clicked.connect(lambda: clean_all(self))
        self.paint.clicked.connect(lambda: fill_xor(self))
        self.addpoint.clicked.connect(lambda: add_point_by_btn(self))
        self.edges = []
        self.point_now = None
        self.point_lock = None
        self.pen = QPen(col_one)
        self.delay.setChecked(False) 
开发者ID:Panda-Lewandowski,项目名称:Computer-graphics,代码行数:19,代码来源:lab5.py

示例9: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self):
        QtWidgets.QWidget.__init__(self)
        uic.loadUi("window.ui", self)
        self.scene = QtWidgets.QGraphicsScene(0, 0, 511, 511)
        self.mainview.setScene(self.scene)
        self.image = QImage(511, 511, QImage.Format_ARGB32_Premultiplied)
        self.pen = QPen()
        self.color_line = QColor(Qt.black)
        self.color_bground = QColor(Qt.white)
        self.draw_once.clicked.connect(lambda: draw_once(self))
        self.clean_all.clicked.connect(lambda: clear_all(self))
        self.btn_bground.clicked.connect(lambda: get_color_bground(self))
        self.btn_line.clicked.connect(lambda: get_color_line(self))
        self.draw_centr.clicked.connect(lambda: draw_centr(self))
        layout = QtWidgets.QHBoxLayout()
        layout.addWidget(self.what)
        layout.addWidget(self.other)
        self.setLayout(layout)
        self.circle.setChecked(True)
        self.canon.setChecked(True)
        #self.circle.toggled.connect(lambda : change_text(self)) 
开发者ID:Panda-Lewandowski,项目名称:Computer-graphics,代码行数:23,代码来源:lab4.py

示例10: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self):
        QtWidgets.QWidget.__init__(self)
        uic.loadUi("window.ui", self)
        self.scene = Scene(0, 0, 561, 581)
        self.scene.win = self
        self.view.setScene(self.scene)
        self.poly.clicked.connect(lambda : set_pol(self))
        self.erase.clicked.connect(lambda: clean_all(self))
        self.paint.clicked.connect(lambda: clipping(self))
        self.rect.clicked.connect(lambda: set_rect(self))
        self.ect.clicked.connect(lambda: add_bars(self))
        self.lock.clicked.connect(lambda: lock(self))
        self.clip = []
        self.pol = []
        self.point_now_clip = None
        self.point_now_pol = None
        self.point_lock_pol = None
        self.point_lock_clip = None
        self.input_pol = False
        self.input_clip = False
        self.pen = QPen(black) 
开发者ID:Panda-Lewandowski,项目名称:Computer-graphics,代码行数:23,代码来源:lab9.py

示例11: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self):
        QtWidgets.QWidget.__init__(self)
        self.ui = uic.loadUi(getLoc('GUIS/SelectConfig.ui'), self)
        self.setWindowIcon(QtGui.QIcon(getLoc('GUIS/icon.png')))
        self.ui.label.setText('<a href="http://www.csb.center"><img src="' + getLoc('GUIS/title.png') + '"></a>')
        self.ui.label.setOpenExternalLinks(True)
        self.ui.donate.setText('<a href="https://www.paypal.me/supportcsb"><img src="' + getLoc('GUIS/donate.png') + '"></a>')
        self.ui.donate.setOpenExternalLinks(True)
        p = self.palette()
        p.setColor(self.backgroundRole(), QtCore.Qt.white)
        self.setPalette(p)
        self.ui.use_conf.clicked.connect(self.useConfig)
        self.ui.new_conf.clicked.connect(self.newConfig)
        self.ui.ASIA_btn.setEnabled(False)
        self.findFiles()

        u = update.updateManager('https://github.com/danielyc/csb', '3.0.12')
        if u.update:
            QtWidgets.QMessageBox.about(self, 'Update available', 'There is an update available, please download the latest version from the website.') 
开发者ID:danielyc,项目名称:csb,代码行数:21,代码来源:main.py

示例12: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, handle,  parent):
        super().__init__('Small Player Info', parent)
        self.widget = uic.loadUi(os.path.join(handle.basepath, 'ui', 'smallplayerinfowidget.ui'))
        self.setWidget(self.widget)
        self.pipPlayerInfo = None
        self.pipCurrWorldspace = None
        self.pipCurrCell = None
        self.pipStats = None
        self.pipRadioInfo = None
        self.maxHP = 0
        self.curHP = 0
        self.maxAP = 0
        self.curAP = 0
        self.maxWT = 0
        self.curWT = 0
        self.xpLevel = 0
        self.xpProgress = 0.0
        self.caps = 0
        self._signalInfoUpdated.connect(self._slotInfoUpdated) 
开发者ID:matzman666,项目名称:PyPipboyApp,代码行数:21,代码来源:smallplayerinfowidget.py

示例13: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, mhandle, parent):
        super().__init__('Quest Browser', parent)
        
        self.Widgets = uic.loadUi(os.path.join(mhandle.basepath, 'ui', 'questswidget.ui'))
        self.setWidget(self.Widgets)
        
        self.QuestListSignal.connect(self.UpdateQuestList)
        self.ObjectiveListSignal.connect(self.UpdateObjectiveList)
        
        self.Widgets.questList.setModel(self.QuestListModel) # we need to call setModel() before selectionModel() (and never afterwards)
        self.Widgets.questList.selectionModel().currentChanged.connect(self.QuestListCurentChanged)
        self.Widgets.questList.doubleClicked.connect(self.QuestListDoubleClicked)
        self.Widgets.objectiveList.setModel(self.ObjectiveListModel)
        self.Widgets.objectiveList.selectionModel().currentChanged.connect(self.ObjectiveListCurrentChanged)
        self.Widgets.objectiveList.doubleClicked.connect(self.ObjectiveListDoubleClicked)
        self.Widgets.showonmapButton.clicked.connect(self.MapButtonClicked)
    
    # QT INIT 
开发者ID:matzman666,项目名称:PyPipboyApp,代码行数:20,代码来源:questswidget.py

示例14: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, mhandle, parent):
        super().__init__("Auto Doc", parent)
        
        self.Logger = logging.getLogger("pypipboyapp.widgets.autodoc")
        
        self.Widgets = uic.loadUi(os.path.join(mhandle.basepath, "ui", "autodocwidget.ui"))
        self.setWidget(self.Widgets)
        
        self.UIUpdateSignal.connect(self.UpdateUI)
        self.AutoDocSignal.connect(self.RunAutoDoc)
        
        self.Widgets.openSettingsButton.clicked.connect(self.OpenSettingsButtonClicked)
        
        self.Stimpak.connect(self.UseAidItem)
        self.MedX.connect(self.UseAidItem)
        self.RadAway.connect(self.UseAidItem)
        self.RadX.connect(self.UseAidItem)
        self.Addictol.connect(self.UseAidItem) 
开发者ID:matzman666,项目名称:PyPipboyApp,代码行数:20,代码来源:autodocwidget.py

示例15: __init__

# 需要导入模块: from PyQt5 import uic [as 别名]
# 或者: from PyQt5.uic import loadUi [as 别名]
def __init__(self, mhandle, parent):
        super().__init__('Combat Stats', parent)
        self.Widgets = uic.loadUi(os.path.join(mhandle.basepath, 'ui', 'statswidget.ui'))
        self.setWidget(self.Widgets)
        
        self.Icons = [
            PipboyIcon("Target.svg", self.Widgets.damageView, 40, "Damage"),
            PipboyIcon("Shield.svg", self.Widgets.resistView, 40, "Resists"),
            PipboyIcon("Pow.svg", self.Widgets.typeNormalView, 40, "Normal Typed"),
            PipboyIcon("Energy.svg", self.Widgets.typeEnergyView, 40, "Energy Typed"),
            PipboyIcon("Drop.svg", self.Widgets.typePoisonView, 40, "Poison Typed"),
            PipboyIcon("Radiation.svg", self.Widgets.typeRadiationView, 40, "Radiation Typed")
        ]
        
        for i in self.Icons:
            i.Update()
        
        self.UIUpdateSignal.connect(self.UpdateUI)
        self.ColorUpdateSignal.connect(self.UpdateIconColor)
    
    # QT INIT 
开发者ID:matzman666,项目名称:PyPipboyApp,代码行数:23,代码来源:statswidget.py


注:本文中的PyQt5.uic.loadUi方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。