本文整理汇总了Python中PyQt5.QtGui.QPalette.windowText方法的典型用法代码示例。如果您正苦于以下问题:Python QPalette.windowText方法的具体用法?Python QPalette.windowText怎么用?Python QPalette.windowText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtGui.QPalette
的用法示例。
在下文中一共展示了QPalette.windowText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: install_widget
# 需要导入模块: from PyQt5.QtGui import QPalette [as 别名]
# 或者: from PyQt5.QtGui.QPalette import windowText [as 别名]
def install_widget(self):
container = QHBoxLayout(self)
container.setContentsMargins(3, 0, 3, 0)
self._actions = FindInFilesActions(self)
container.addWidget(self._actions)
self.__count = 0
top_widget = QFrame()
top_layout = QVBoxLayout(top_widget)
top_layout.setContentsMargins(0, 0, 0, 0)
top_layout.setSpacing(0)
self._message_frame = QFrame()
self._message_frame.hide()
self._message_frame.setAutoFillBackground(True)
pal = QPalette()
pal.setColor(QPalette.Window, QColor("#6a6ea9"))
pal.setColor(QPalette.WindowText, pal.windowText().color())
self._message_frame.setPalette(pal)
self._message_label = QLabel("")
message_layout = QHBoxLayout(self._message_frame)
message_layout.addStretch(1)
message_layout.setContentsMargins(2, 2, 2, 2)
message_layout.addWidget(self._message_label)
top_layout.addWidget(self._message_frame)
self._tree_results = SearchResultTreeView(self)
top_layout.addWidget(self._tree_results)
container.addWidget(top_widget)
self._main_container = IDE.get_service("main_container")
# Search worker
self._search_worker = FindInFilesWorker()
search_thread = QThread()
self._search_worker.moveToThread(search_thread)
self._search_worker.resultAvailable.connect(self._on_worker_finished)
search_thread.finished.connect(search_thread.deleteLater)
self._actions.searchRequested.connect(self._on_search_requested)
self._tree_results.activated.connect(self._go_to)