本文整理汇总了Python中PyQt5.Qt.QDateTimeEdit.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python QDateTimeEdit.setObjectName方法的具体用法?Python QDateTimeEdit.setObjectName怎么用?Python QDateTimeEdit.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.Qt.QDateTimeEdit
的用法示例。
在下文中一共展示了QDateTimeEdit.setObjectName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: HistoryWidget
# 需要导入模块: from PyQt5.Qt import QDateTimeEdit [as 别名]
# 或者: from PyQt5.Qt.QDateTimeEdit import setObjectName [as 别名]
class HistoryWidget(QDialog):
"""
class HistonWidget
"""
_v_curve_colors = [Qt.white, Qt.gray, Qt.red, Qt.green, Qt.blue, Qt.cyan, Qt.magenta, Qt.darkYellow]
_v_curve_checked = [True, True, True, True, True, True, True, True]
def __init__(self, parent=None):
super(HistoryWidget, self).__init__(parent)
self.setObjectName("HistoryWidget")
self.resize(800, 480)
self.setWindowTitle("历史数据查看")
# layout - top
horiLayoutTop = QHBoxLayout()
buttonQuit = QPushButton(self)
buttonQuit.setObjectName("buttonQuit")
horiLayoutTop.addSpacing(25)
horiLayoutTop.addWidget(buttonQuit, 0, Qt.AlignLeft)
horiLayoutTop.addStretch()
# button-export
buttonExport = QPushButton(self)
buttonExport.setObjectName("buttonExport")
horiLayoutTop.addWidget(buttonExport)
horiLayoutTop.addStretch()
# button-open
buttonOpen = QPushButton(self)
buttonOpen.setObjectName("buttonOpen")
horiLayoutTop.addWidget(buttonOpen)
horiLayoutTop.addStretch()
formLayoutTime = QFormLayout()
formLayoutTime.setFormAlignment(Qt.AlignVCenter)
horiLayoutTop.addLayout(formLayoutTime)
horiLayoutTop.addStretch()
self.dateTimeEditStart = QDateTimeEdit(self)
self.dateTimeEditStart.setObjectName("dateTimeEditStart")
self.dateTimeEditStart.setDisplayFormat("yyyy-MM-dd HH:mm:ss")
formLayoutTime.addRow("起始时间:", self.dateTimeEditStart)
self.dateTimeEditEnd = QDateTimeEdit(self)
self.dateTimeEditEnd.setObjectName("dateTimeEditEnd")
self.dateTimeEditEnd.setDisplayFormat("yyyy-MM-dd HH:mm:ss")
formLayoutTime.addRow("结束时间:", self.dateTimeEditEnd)
# LBP
formLayoutLBP = QFormLayout()
formLayoutLBP.setFormAlignment(Qt.AlignVCenter)
formLayoutLBP.setLabelAlignment(Qt.AlignRight)
horiLayoutTop.addLayout(formLayoutLBP)
horiLayoutTop.addStretch()
self.checkBoxLBPMajor = QCheckBox("主", self)
self.checkBoxLBPMajor.setProperty("curveColor", "#101010")
self.checkBoxLBPMinor = QCheckBox("副", self)
self.checkBoxLBPMinor.setProperty("curveColor", "#101010")
formLayoutLBP.addRow("左刹车压力:", self.checkBoxLBPMajor)
formLayoutLBP.addRow("", self.checkBoxLBPMinor)
# RBP
formLayoutRBP = QFormLayout()
formLayoutRBP.setFormAlignment(Qt.AlignVCenter)
formLayoutRBP.setLabelAlignment(Qt.AlignRight)
horiLayoutTop.addLayout(formLayoutRBP)
horiLayoutTop.addStretch()
self.checkBoxRBPMajor = QCheckBox("主", self)
self.checkBoxRBPMajor.setProperty("curveColor", "#101010")
self.checkBoxRBPMinor = QCheckBox("副", self)
self.checkBoxRBPMinor.setProperty("curveColor", "#101010")
formLayoutRBP.addRow("右刹车压力:", self.checkBoxRBPMajor)
formLayoutRBP.addRow("", self.checkBoxRBPMinor)
# LRP
formLayoutLRP = QFormLayout()
formLayoutLRP.setFormAlignment(Qt.AlignVCenter)
formLayoutLRP.setLabelAlignment(Qt.AlignRight)
horiLayoutTop.addLayout(formLayoutLRP)
horiLayoutTop.addStretch()
self.checkBoxLRPTheory = QCheckBox("理论", self)
self.checkBoxLRPTheory.setProperty("curveColor", "#101010")
self.checkBoxLRPReal = QCheckBox("实际", self)
self.checkBoxLRPReal.setProperty("curveColor", "#101010")
formLayoutLRP.addRow("左转速:", self.checkBoxLRPTheory)
formLayoutLRP.addRow("", self.checkBoxLRPReal)
# RRP
formLayoutRRP = QFormLayout()
formLayoutRRP.setFormAlignment(Qt.AlignVCenter)
formLayoutRRP.setLabelAlignment(Qt.AlignRight)
horiLayoutTop.addLayout(formLayoutRRP)
horiLayoutTop.addStretch()
self.checkBoxRRPTheory = QCheckBox("理论", self)
self.checkBoxRRPTheory.setProperty("curveColor", "#101010")
self.checkBoxRRPReal = QCheckBox("实际", self)
self.checkBoxRRPReal.setProperty("curveColor", "#101010")
formLayoutRRP.addRow("右转速:", self.checkBoxRRPTheory)
#.........这里部分代码省略.........