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


Python Qt.LeftToRight方法代码示例

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

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

示例1: __init__

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

        self.ui = Ui_embeddedDialog()
        self.ui.setupUi(self)
        self.ui.layoutDirection.setCurrentIndex(self.layoutDirection() != Qt.LeftToRight)

        for styleName in QStyleFactory.keys():
            self.ui.style.addItem(styleName)
            if self.style().objectName().lower() == styleName.lower():
                self.ui.style.setCurrentIndex(self.ui.style.count() -1)

        self.ui.layoutDirection.activated.connect(self.layoutDirectionChanged)
        self.ui.spacing.valueChanged.connect(self.spacingChanged)
        self.ui.fontComboBox.currentFontChanged.connect(self.fontChanged)
        self.ui.style.activated[str].connect(self.styleChanged) 
开发者ID:pyqt,项目名称:examples,代码行数:18,代码来源:embeddeddialogs.py


示例2: initUI

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import LeftToRight [as 别名]
def initUI(self):
        self.ui = Ui_Home()
        self.ui.setupUi(self)

        self.setGeometry(
            QStyle.alignedRect(
                Qt.LeftToRight,
                Qt.AlignCenter,
                self.size(),
                qApp.desktop().availableGeometry()
            )
        )
        self.show()

        self.ui.searchButton.clicked.connect(self.onSearch)
        self.ui.searchTextbox.returnPressed.connect(self.onSearch)

        self.ui.torrentList.selectionModel().selectionChanged.connect(self.onTorrentSelect)

        self.ui.torrentInfoMagnetLink.linkActivated.connect(self.onLinkClick)
        self.ui.torrentInfoTorrentLink.linkActivated.connect(self.onLinkClick) 
开发者ID:subins2000,项目名称:TorrentBro,代码行数:23,代码来源:Home.py


示例3: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import LeftToRight [as 别名]
def __init__(self,parent=None):
        super(QtBoolEdit, self).__init__(parent)
        self.m_checkBox = QCheckBox(self)
        self.m_textVisible = True
        lt = QHBoxLayout()
        if (QApplication.layoutDirection() == Qt.LeftToRight):
            lt.setContentsMargins(4, 0, 0, 0)
        else:
            lt.setContentsMargins(0, 0, 4, 0)
        lt.addWidget(self.m_checkBox)
        self.setLayout(lt)
        self.m_checkBox.toggled.connect(self.toggledSignal)
        self.setFocusProxy(self.m_checkBox)
        self.m_checkBox.setText(self.tr("True")) 
开发者ID:theall,项目名称:QtPropertyBrowserV2.6-for-pyqt5,代码行数:16,代码来源:qtpropertybrowserutils.py


示例4: setupTreeViewEditorMargin

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import LeftToRight [as 别名]
def setupTreeViewEditorMargin(lt):
    DecorationMargin = 4
    if (QApplication.layoutDirection() == Qt.LeftToRight):
        lt.setContentsMargins(DecorationMargin, 0, 0, 0)
    else:
        lt.setContentsMargins(0, 0, DecorationMargin, 0) 
开发者ID:theall,项目名称:QtPropertyBrowserV2.6-for-pyqt5,代码行数:8,代码来源:qteditorfactory.py


示例5: layoutDirectionChanged

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import LeftToRight [as 别名]
def layoutDirectionChanged(self, index):
        if index == 0:
            self.setLayoutDirection(Qt.LeftToRight)
        else:
            self.setLayoutDirection(Qt.RightToLeft) 
开发者ID:L1nwatch,项目名称:Mac-Python-3.X,代码行数:7,代码来源:embeddeddialogs.py


示例6: paint

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import LeftToRight [as 别名]
def paint(self, painter, option, index):
        hasValue = True
        if (self.m_editorPrivate):
            property = self.m_editorPrivate.indexToProperty(index)
            if (property):
                hasValue = property.hasValue()

        opt = QStyleOptionViewItem(option)
        if ((self.m_editorPrivate and index.column() == 0) or not hasValue):
            property = self.m_editorPrivate.indexToProperty(index)
            if (property and property.isModified()):
                opt.font.setBold(True)
                opt.fontMetrics = QFontMetrics(opt.font)

        c = QColor()
        if (not hasValue and self.m_editorPrivate.markPropertiesWithoutValue()):
            c = opt.palette.color(QPalette.Dark)
            opt.palette.setColor(QPalette.Text, opt.palette.color(QPalette.BrightText))
        else:
            c = self.m_editorPrivate.calculatedBackgroundColor(self.m_editorPrivate.indexToBrowserItem(index))
            if (c.isValid() and (opt.features & QStyleOptionViewItem.Alternate)):
                c = c.lighter(112)

        if (c.isValid()):
            painter.fillRect(option.rect, c)
        opt.state &= ~QStyle.State_HasFocus

        if (index.column() == 1):
            item = self.m_editorPrivate.indexToItem(index)
            if (self.m_editedItem and (self.m_editedItem == item)):
                self.m_disablePainting = True

        super(QtPropertyEditorDelegate, self).paint(painter, opt, index)
        if (option.type):
            self.m_disablePainting = False

        opt.palette.setCurrentColorGroup(QPalette.Active)
        color = QApplication.style().styleHint(QStyle.SH_Table_GridLineColor, opt)
        painter.save()
        painter.setPen(QPen(color))
        if (not self.m_editorPrivate or (not self.m_editorPrivate.lastColumn(index.column()) and hasValue)):
            if option.direction == Qt.LeftToRight:
                right = option.rect.right()
            else:
                right = option.rect.left()
            painter.drawLine(right, option.rect.y(), right, option.rect.bottom())

        painter.restore() 
开发者ID:theall,项目名称:QtPropertyBrowserV2.6-for-pyqt5,代码行数:50,代码来源:qttreepropertybrowser.py


示例7: help_dialog

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import LeftToRight [as 别名]
def help_dialog(self):

        self.helpDialog = QDialog()
        self.helpDialog.setObjectName("self.helpDialog")
        self.helpDialog.setWindowModality(Qt.ApplicationModal)
        self.helpDialog.setFixedSize(362, 151)
        icon = QIcon()
        icon.addPixmap(QPixmap("../resource/logo.png"), QIcon.Normal, QIcon.Off)
        self.helpDialog.setWindowIcon(icon)
        self.helpDialog.setLayoutDirection(Qt.LeftToRight)
        self.helpDialog.setAutoFillBackground(False)
        self.helpDialog.setSizeGripEnabled(False)
        self.helpDialog.setModal(False)
        self.docButton = QPushButton(self.helpDialog)
        self.docButton.setGeometry(QRect(200, 100, 111, 41))
        icon1 = QIcon()
        icon1.addPixmap(QPixmap("../resource/Doc.png"), QIcon.Normal, QIcon.Off)
        self.docButton.setIcon(icon1)
        self.docButton.setObjectName("docButton")
        self.tubeButton = QPushButton(self.helpDialog)
        self.tubeButton.setGeometry(QRect(50, 100, 111, 41))
        icon2 = QIcon()
        icon2.addPixmap(QPixmap("../resource/YouTube.png"), QIcon.Normal, QIcon.Off)
        self.tubeButton.setIcon(icon2)
        self.tubeButton.setObjectName("tubeButton")
        self.label = QLabel(self.helpDialog)
        self.label.setGeometry(QRect(20, 10, 331, 21))
        font = QFont()
        font.setPointSize(12)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.label_2 = QLabel(self.helpDialog)
        self.label_2.setGeometry(QRect(20, 30, 321, 21))
        font = QFont()
        font.setPointSize(12)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.label_3 = QLabel(self.helpDialog)
        self.label_3.setGeometry(QRect(20, 50, 321, 20))
        font = QFont()
        font.setPointSize(12)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.label_4 = QLabel(self.helpDialog)
        self.label_4.setGeometry(QRect(30, 80, 211, 17))
        font = QFont()
        font.setPointSize(8)
        font.setItalic(True)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")

        self.retranslate_help_ui(self.helpDialog)
        QMetaObject.connectSlotsByName(self.helpDialog)
        self.docButton.clicked.connect(self.open_github)


        self.helpDialog.exec_()



    #help_dialog calls this inturn to set some labels messages 
开发者ID:SapneshNaik,项目名称:360fy-360_video_creator,代码行数:63,代码来源:fy360.py



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