當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。