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


Python QLCDNumber.setFrameShape方法代码示例

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


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

示例1: addLCDNumbers

# 需要导入模块: from PyQt5.QtWidgets import QLCDNumber [as 别名]
# 或者: from PyQt5.QtWidgets.QLCDNumber import setFrameShape [as 别名]
    def addLCDNumbers(self):
        fortLCD = QLCDNumber(1, self)
        fortLCD.setFrameShape(QFrame.NoFrame)
        fortLCD.move(125, 50)
        fortLCD.resize(40, 40)
        fortLCD.display(self.square.ter.buildings.fort_lvl)
        incomeLCD = QLCDNumber(2, self)
        incomeLCD.setFrameShape(QFrame.NoFrame)
        incomeLCD.move(117, 10)
        incomeLCD.resize(40, 40)
        incomeLCD.display(self.square.ter.get_income())
        marketLCD = QLCDNumber(1, self)
        marketLCD.setFrameShape(QFrame.NoFrame)
        marketLCD.move(125, 90)
        marketLCD.resize(40, 40)
        marketLCD.display(self.square.ter.buildings.market_lvl)

        self.square.incomeChanged.connect(incomeLCD.display)
        self.square.fortUpgr.connect(fortLCD.display)
        self.square.marketUpgr.connect(marketLCD.display)
开发者ID:niksanaznc,项目名称:territory-war-game,代码行数:22,代码来源:gui.py

示例2: addIncomeInfo

# 需要导入模块: from PyQt5.QtWidgets import QLCDNumber [as 别名]
# 或者: from PyQt5.QtWidgets.QLCDNumber import setFrameShape [as 别名]
 def addIncomeInfo(self, font):
     '''
     Adds the income LCDNumber and connects it with the correct signals.
     '''
     incomeLbl = QLabel("Income:", self)
     incomeLbl.setFont(font)
     incomeLbl.move(460, 10)
     incomeLcd = QLCDNumber(3, self)
     incomeLcd.move(530, 0)
     incomeLcd.setFrameShape(QFrame.NoFrame)
     incomeLcd.resize(60, 40)
     self.sig.incomeChanged.connect(incomeLcd.display)
     self.sig.incomeChanged.emit(self.game.player.income())
开发者ID:niksanaznc,项目名称:territory-war-game,代码行数:15,代码来源:gui.py

示例3: addGoldInfo

# 需要导入模块: from PyQt5.QtWidgets import QLCDNumber [as 别名]
# 或者: from PyQt5.QtWidgets.QLCDNumber import setFrameShape [as 别名]
 def addGoldInfo(self, font):
     '''
     Adds gold LCDNumber and connects it with the correct signal.
     '''
     goldLbl = QLabel('Gold:', self)
     goldLbl.move(300, 10)
     goldLbl.setFont(font)
     goldLcd = QLCDNumber(4, self)
     goldLcd.move(360, 0)
     goldLcd.setFrameShape(QFrame.NoFrame)
     goldLcd.resize(65, 40)
     self.sig.goldChanged.connect(goldLcd.display)
     self.sig.goldChanged.emit(self.game.player.gold)
开发者ID:niksanaznc,项目名称:territory-war-game,代码行数:15,代码来源:gui.py

示例4: addMaintInfo

# 需要导入模块: from PyQt5.QtWidgets import QLCDNumber [as 别名]
# 或者: from PyQt5.QtWidgets.QLCDNumber import setFrameShape [as 别名]
 def addMaintInfo(self, font):
     '''
     Adds maintenance QLCDNumber and connects it with the correct signals.
     '''
     maintLbl = QLabel("Total maintenance:", self)
     maintLbl.move(620, 10)
     maintLbl.setFont(font)
     maintLcd = QLCDNumber(3, self)
     maintLcd.move(840, 7)
     maintLcd.setFrameShape(QFrame.NoFrame)
     maintLcd.resize(50, 30)
     self.sig.maintChanged.connect(maintLcd.display)
     maint = self.game.player.get_armies_maint()
     self.sig.maintChanged.emit(maint[0] + maint[1])
开发者ID:niksanaznc,项目名称:territory-war-game,代码行数:16,代码来源:gui.py


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