本文整理汇总了Python中PySide.QtCore.Qt.black方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.black方法的具体用法?Python Qt.black怎么用?Python Qt.black使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtCore.Qt
的用法示例。
在下文中一共展示了Qt.black方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _new_graph
# 需要导入模块: from PySide.QtCore import Qt [as 别名]
# 或者: from PySide.QtCore.Qt import black [as 别名]
def _new_graph(self):
self._graph = QtGui.QPixmap(self.width(), self.height())
self._graph.fill(Qt.black)
示例2: paintEvent
# 需要导入模块: from PySide.QtCore import Qt [as 别名]
# 或者: from PySide.QtCore.Qt import black [as 别名]
def paintEvent(self, event):
painter = QPainter()
painter.begin(self)
colour = self._colour
if not self._lit:
colour = self._colour.darker(300)
painter.setPen(QPen(Qt.black, 1))
painter.setBrush(QBrush(colour))
rect = event.rect()
radius = min(rect.width(), rect.height()) / 3
painter.drawEllipse(rect.center(), radius, radius)
painter.end()
示例3: run
# 需要导入模块: from PySide.QtCore import Qt [as 别名]
# 或者: from PySide.QtCore.Qt import black [as 别名]
def run(self):
if self.ui.cb_batch.isChecked():
self.last_log_file = None
else:
if self.params is None:
self.create_params_file(self.params)
return
elif not os.path.exists(self.params):
self.create_params_file(self.params)
return
if self.ui.tabWidget.currentIndex() == 0:
args = self.command_line_args()
elif self.ui.tabWidget.currentIndex() == 2:
args = self.gui_command_line_args()
self.update_result_tab()
# # Start process
self.ui.edit_stdout.clear()
format = self.ui.edit_stdout.currentCharFormat()
format.setFontWeight(QFont.Normal)
format.setForeground(Qt.blue)
self.ui.edit_stdout.setCurrentCharFormat(format)
time_str = datetime.datetime.now().ctime()
start_msg = '''\
Starting spyking circus at {time_str}.
Command line call:
{call}
'''.format(time_str=time_str, call=' '.join(args))
self.ui.edit_stdout.appendPlainText(textwrap.dedent(start_msg))
format.setForeground(Qt.black)
self.ui.edit_stdout.setCurrentCharFormat(format)
self.ui.edit_stdout.appendPlainText('\n')
self.process = QProcess(self)
self.process.readyReadStandardOutput.connect(self.append_output)
self.process.readyReadStandardError.connect(self.append_error)
self.process.started.connect(self.process_started)
self.process.finished.connect(self.process_finished)
self.process.error.connect(self.process_errored)
self._interrupted = False
self.process.start(args[0], args[1:])