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


Python Qt.WA_MacShowFocusRect方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WA_MacShowFocusRect [as 别名]
def __init__(self, parent=None):
        super(VideoList, self).__init__(parent)
        self.parent = parent
        self.theme = self.parent.theme
        self._progressbars = []
        self.setMouseTracking(True)
        self.setDropIndicatorShown(True)
        self.setFixedWidth(190)
        self.setAttribute(Qt.WA_MacShowFocusRect, False)
        self.setContentsMargins(0, 0, 0, 0)
        self.setItemDelegate(VideoItem(self))
        self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Expanding)
        self.setUniformItemSizes(True)
        self.setDragEnabled(True)
        self.setDragDropMode(QAbstractItemView.InternalMove)
        self.setContextMenuPolicy(Qt.CustomContextMenu)
        self.setAlternatingRowColors(True)
        self.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
        self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.setObjectName('cliplist')
        self.setStyleSheet('QListView::item { border: none; }')
        self.opacityEffect = OpacityEffect(0.3)
        self.opacityEffect.setEnabled(False)
        self.setGraphicsEffect(self.opacityEffect) 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:26,代码来源:videolist.py

示例2: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WA_MacShowFocusRect [as 别名]
def __init__(self):
        self.setStyleSheet(  # type: ignore[attr-defined]
            """
            QLineEdit {
                border: 0px;
                padding-left: 1px;
                background-color: transparent;
            }
            """
        )
        self.setAttribute(  # type: ignore[attr-defined]
            Qt.WA_MacShowFocusRect, False) 
开发者ID:qutebrowser,项目名称:qutebrowser,代码行数:14,代码来源:miscwidgets.py

示例3: _create_gui

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WA_MacShowFocusRect [as 别名]
def _create_gui(self):
        columns = ['offset','name','size','value']
        self.tree = QtWidgets.QTreeWidget()

        self.tree.setAttribute(Qt.WA_MacShowFocusRect, 0)
        self.tree.setColumnCount(len(columns))
        self.tree.setHeaderLabels(columns)
        self.tree.setContextMenuPolicy(Qt.CustomContextMenu)
        self.tree.customContextMenuRequested.connect(self.context_menu)

        hbox = QtWidgets.QHBoxLayout()
        lbl_address = QtWidgets.QLabel("Address:")
        lbl_address.setStyleSheet("font-weight: bold;")
        hbox.addWidget(lbl_address)
        self.lbl_hex_addr = QtWidgets.QLabel()
        hbox.addWidget(self.lbl_hex_addr)
        hbox.addStretch(1)

        layout = QtWidgets.QVBoxLayout()
        layout.addLayout(hbox)
        layout.addWidget(self.tree)

        #layout.setSpacing(0)
        layout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(layout) 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:27,代码来源:structs.py

示例4: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WA_MacShowFocusRect [as 别名]
def __init__(self, service: VideoService, parent: QWidget, flags=Qt.WindowCloseButtonHint):
        super(SettingsDialog, self).__init__(parent.parentWidget(), flags)
        self.parent = parent
        self.service = service
        self.settings = self.parent.settings
        self.theme = self.parent.theme
        self.setObjectName('settingsdialog')
        if sys.platform in {'win32', 'darwin'}:
            self.setStyle(QStyleFactory.create('Fusion'))
        self.setWindowTitle('Settings')
        self.categories = QListWidget(self)
        self.categories.setResizeMode(QListView.Fixed)
        self.categories.setStyleSheet('QListView::item { text-decoration: none; }')
        self.categories.setAttribute(Qt.WA_MacShowFocusRect, False)
        self.categories.setObjectName('settingsmenu')
        self.categories.setUniformItemSizes(True)
        self.categories.setMouseTracking(True)
        self.categories.setViewMode(QListView.IconMode)
        self.categories.setIconSize(QSize(90, 60))
        self.categories.setMovement(QListView.Static)
        self.categories.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.pages = QStackedWidget(self)
        self.pages.addWidget(GeneralPage(self))
        self.pages.addWidget(VideoPage(self))
        self.pages.addWidget(ThemePage(self))
        self.pages.addWidget(ToolsPage(self))
        self.pages.addWidget(LogsPage(self))
        self.initCategories()
        horizontalLayout = QHBoxLayout()
        horizontalLayout.setSpacing(5)
        horizontalLayout.addWidget(self.categories)
        horizontalLayout.addWidget(self.pages, 1)
        buttons = QDialogButtonBox(QDialogButtonBox.Ok, self)
        buttons.accepted.connect(self.close)
        mainLayout = QVBoxLayout()
        mainLayout.addLayout(horizontalLayout)
        mainLayout.addWidget(buttons)
        self.setLayout(mainLayout) 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:40,代码来源:settings.py

示例5: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WA_MacShowFocusRect [as 别名]
def __init__(self, app, parent=None):
        super().__init__(parent)

        self._app = app
        self.setPlaceholderText('搜索歌曲、歌手、专辑、用户')
        self.setToolTip('直接输入文字可以进行过滤,按 Enter 可以搜索\n'
                        '输入 >>> 前缀之后,可以执行 Python 代码\n'
                        '输入 # 前缀之后,可以过滤表格内容\n'
                        '输入 > 前缀可以执行 fuo 命令(未实现,欢迎 PR)')
        self.setFont(QFontDatabase.systemFont(QFontDatabase.FixedFont))
        self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        self.setFixedHeight(32)
        self.setFrame(False)
        self.setAttribute(Qt.WA_MacShowFocusRect, 0)
        self.setTextMargins(5, 0, 0, 0)

        self._timer = QTimer(self)
        self._cmd_text = None
        self._mode = 'cmd'  # 详见 _set_mode 函数
        self._timer.timeout.connect(self.__on_timeout)

        self.textChanged.connect(self.__on_text_edited)
        # self.textEdited.connect(self.__on_text_edited)
        self.returnPressed.connect(self.__on_return_pressed)

        self._app.hotkey_mgr.register(
            [QKeySequence('Ctrl+F'), QKeySequence(':'), QKeySequence('Alt+x')],
            self.setFocus
        ) 
开发者ID:feeluown,项目名称:FeelUOwn,代码行数:31,代码来源:magicbox.py

示例6: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WA_MacShowFocusRect [as 别名]
def __init__(self):
        super().__init__()
        self.resize(600, 500)
        self.populated = False
        self.maxhostnum = 0
        self.hosts = dict()
        self.changed = defaultdict(dict)
        self.setLayout(QVBoxLayout())
        self.layout().setSpacing(0)
        self.layout().setContentsMargins(1, 1, 1, 1)
        self.scrollarea = QScrollArea()
        self.scrollarea.layout = QVBoxLayout()
        self.layout().addWidget(self.scrollarea)
        bottombar = QWidget()
        bottombar.setLayout(QHBoxLayout())
        bottombar.layout().setContentsMargins(11, 1, 1, 1)
        self.changedlabel = QLabel()
        self.resetbtn = QPushButton('Reset')
        self.resetbtn.setFixedWidth(100)
        self.resetbtn.setEnabled(False)
        self.resetbtn.clicked.connect(self.btnclicked)
        self.savebtn = QPushButton('Save')
        self.savebtn.setFixedWidth(100)
        self.savebtn.setEnabled(False)
        self.savebtn.clicked.connect(self.btnclicked)

        bottombar.layout().addWidget(self.changedlabel)
        bottombar.layout().addWidget(self.resetbtn)
        bottombar.layout().addWidget(self.savebtn)
        self.layout().addWidget(bottombar)

        self.nodetree = QTreeWidget()
        self.nodetree.setFixedWidth(200)
        self.nodetree.setIndentation(0)
        self.nodetree.setColumnCount(2)
        self.nodetree.setStyleSheet('padding:0px')
        self.nodetree.setAttribute(Qt.WA_MacShowFocusRect, False)
        self.nodetree.header().resizeSection(0, 130)
        self.nodetree.setHeaderHidden(True)
        self.nodetree.itemClicked.connect(self.nodetreeClicked)
        self.nodesettings = QWidget()
        self.nodesettings.setLayout(QVBoxLayout())
        container = QWidget()
        container.setLayout(self.scrollarea.layout)
        self.scrollarea.layout.setAlignment(Qt.AlignTop|Qt.AlignLeft)
        self.scrollarea.setWidget(container)
        self.scrollarea.setWidgetResizable(True)

        bs.net.nodes_changed.connect(self.nodesChanged) 
开发者ID:TUDelft-CNS-ATM,项目名称:bluesky,代码行数:51,代码来源:settingswindow.py


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