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


Python Qt.AlignTop方法代码示例

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


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

示例1: init_middle_layout

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def init_middle_layout(self):
            if not self.should_show:
                return

            vbox = QtWidgets.QVBoxLayout()
            self.select_all = QtWidgets.QCheckBox('Select All ')
            self.filter_sub_funcs = QtWidgets.QCheckBox('Filter Out "sub_" functions ')
            vbox.addWidget(self.filter_sub_funcs)
            vbox.addWidget(self.select_all)

            format_str = '{} functions'.format(self.total_functions)
            self.function_number = QtWidgets.QLabel(format_str)
            self.function_number.setAlignment(Qt.AlignTop)
            self.middle_layout.addWidget(self.function_number)
            self.middle_layout.addStretch()
            self.middle_layout.addLayout(vbox) 
开发者ID:vrtadmin,项目名称:FIRST-plugin-ida,代码行数:18,代码来源:first.py

示例2: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        self.functionGroup = QGroupBox(self)
        self.functionGroup.setTitle(translate('PresetSrcSettings', 'Presets'))
        self.functionGroup.setLayout(QVBoxLayout())
        self.layout().addWidget(self.functionGroup)

        self.functionCombo = QComboBox(self.functionGroup)
        self.functionGroup.layout().addWidget(self.functionCombo)

        for function in sorted(PresetSrc.PRESETS.keys()):
            self.functionCombo.addItem(function)

        self.functionDuration = QTimeEdit(self.functionGroup)
        self.functionDuration.setDisplayFormat('HH.mm.ss.zzz')
        self.functionGroup.layout().addWidget(self.functionDuration) 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:21,代码来源:preset_src.py

示例3: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        self.jackGroup = QGroupBox(self)
        self.jackGroup.setLayout(QHBoxLayout())
        self.layout().addWidget(self.jackGroup)

        self.connectionsEdit = QPushButton(self.jackGroup)
        self.connectionsEdit.clicked.connect(self.__edit_connections)
        self.jackGroup.layout().addWidget(self.connectionsEdit)

        self.__jack_client = jack.Client('LiSP_SettingsControl')
        self.connections = JackSink.default_connections(self.__jack_client)

        self.retranlsateUi() 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:19,代码来源:jack_sink.py

示例4: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        self.panBox = QGroupBox(self)
        self.panBox.setGeometry(0, 0, self.width(), 80)
        self.panBox.setLayout(QHBoxLayout(self.panBox))
        self.layout().addWidget(self.panBox)

        self.panSlider = QSlider(self.panBox)
        self.panSlider.setRange(-10, 10)
        self.panSlider.setPageStep(1)
        self.panSlider.setOrientation(Qt.Horizontal)
        self.panSlider.valueChanged.connect(self.pan_changed)
        self.panBox.layout().addWidget(self.panSlider)

        self.panLabel = QLabel(self.panBox)
        self.panLabel.setAlignment(Qt.AlignCenter)
        self.panBox.layout().addWidget(self.panLabel)

        self.panBox.layout().setStretch(0, 5)
        self.panBox.layout().setStretch(1, 1)

        self.retransaleUi() 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:27,代码来源:audio_pan.py

示例5: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        self.group = QGroupBox(self)
        self.group.setLayout(QVBoxLayout(self.group))
        self.layout().addWidget(self.group)

        self.actionCombo = QComboBox(self.group)
        for action in [CueAction.Stop, CueAction.FadeOutStop, CueAction.Pause,
                       CueAction.FadeOutPause, CueAction.Interrupt,
                       CueAction.FadeOutInterrupt]:
            self.actionCombo.addItem(
                translate('CueAction', action.name), action.value)
        self.group.layout().addWidget(self.actionCombo)

        self.retranslateUi() 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:20,代码来源:stop_all.py

示例6: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        self.group = QGroupBox(self)
        self.group.setLayout(QVBoxLayout(self.group))
        self.layout().addWidget(self.group)

        self.commandLineEdit = QLineEdit(self.group)
        self.group.layout().addWidget(self.commandLineEdit)

        self.noOutputCheckBox = QCheckBox(self)
        self.layout().addWidget(self.noOutputCheckBox)

        self.noErrorCheckBox = QCheckBox(self)
        self.layout().addWidget(self.noErrorCheckBox)

        self.killCheckBox = QCheckBox(self)
        self.layout().addWidget(self.killCheckBox)

        self.retranslateUi() 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:24,代码来源:command_cue.py

示例7: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        # Interrupt
        self.interruptGroup = QGroupBox(self)
        self.interruptGroup.setLayout(QVBoxLayout())
        self.layout().addWidget(self.interruptGroup)

        self.interruptFadeEdit = FadeEdit(self.interruptGroup)
        self.interruptGroup.layout().addWidget(self.interruptFadeEdit)

        # Action
        self.actionGroup = QGroupBox(self)
        self.actionGroup.setLayout(QVBoxLayout())
        self.layout().addWidget(self.actionGroup)

        self.fadeActionEdit = FadeEdit(self.actionGroup)
        self.actionGroup.layout().addWidget(self.fadeActionEdit)

        self.retranslateUi() 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:24,代码来源:cue_app_settings.py

示例8: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        self.groupBox = QGroupBox(self)
        self.groupBox.setLayout(QGridLayout())
        self.layout().addWidget(self.groupBox)

        self.activateBox = QCheckBox(self.groupBox)
        self.groupBox.layout().addWidget(self.activateBox, 0, 0)

        self.hresBox = QCheckBox(self.groupBox)
        self.groupBox.layout().addWidget(self.hresBox, 1, 0)

        self.formatLabel = QLabel(self.groupBox)
        self.groupBox.layout().addWidget(self.formatLabel, 2, 0)

        self.formatBox = QComboBox(self.groupBox)
        self.formatBox.addItem('FILM')
        self.formatBox.addItem('EBU')
        self.formatBox.addItem('SMPTE')
        self.groupBox.layout().addWidget(self.formatBox, 2, 1)

        self.retranslateUi() 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:27,代码来源:timecode_settings.py

示例9: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, parent=None):
        super(BaseTab, self).__init__(parent)
        self.setTextFormat(Qt.RichText)
        self.setWordWrap(True)
        self.setAlignment(Qt.AlignLeft | Qt.AlignTop)
        self.setOpenExternalLinks(True)
        if parent.theme == 'dark':
            bgcolor = 'rgba(12, 15, 16, 210)'
            pencolor = '#FFF'
        else:
            bgcolor = 'rgba(255, 255, 255, 200)'    
            pencolor = '#000'
        self.setStyleSheet('''
            QLabel {{
                background-color: {bgcolor};
                color: {pencolor};
                padding: 8px;
            }}'''.format(**locals()))


# noinspection PyBroadException 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:23,代码来源:about.py

示例10: _setup_ui

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def _setup_ui(self):
        self.cover_label.setMaximumWidth(200)
        self._v_layout = QVBoxLayout(self)
        self._h_layout = QHBoxLayout()
        self._right_layout = QVBoxLayout()
        self._right_layout.addStretch(0)
        self._right_layout.addWidget(self.title_label)
        self._right_layout.addWidget(self.meta_label)
        self._h_layout.addWidget(self.cover_label)
        self._h_layout.setAlignment(self.cover_label, Qt.AlignTop)
        self._h_layout.addLayout(self._right_layout)
        self._h_layout.setStretchFactor(self._right_layout, 2)
        self._h_layout.setStretchFactor(self.cover_label, 1)
        self._h_layout.setContentsMargins(0, 30, 0, 0)
        self._h_layout.setSpacing(30)
        self._v_layout.addLayout(self._h_layout)

        self._right_layout.setContentsMargins(0, 0, 0, 0)
        self._right_layout.setSpacing(5)

        # left margin is same as toolbar left margin
        self.layout().setContentsMargins(30, 0, 30, 0)
        self.layout().setSpacing(0) 
开发者ID:feeluown,项目名称:FeelUOwn,代码行数:25,代码来源:meta.py

示例11: initUI

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

        grid = QGridLayout()
        grid.setSpacing(10)

        x = 0
        y = 0

        self.text = "x: {0},  y: {1}".format(x, y)

        self.label = QLabel(self.text, self)
        grid.addWidget(self.label, 0, 0, Qt.AlignTop)

        self.setMouseTracking(True)

        self.setLayout(grid)

        self.setGeometry(300, 300, 350, 200)
        self.setWindowTitle('Event object')
        self.show() 
开发者ID:Yeah-Kun,项目名称:python,代码行数:22,代码来源:Event_object.py

示例12: update_aliases_on_gui

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def update_aliases_on_gui(self):
        '''Updates aliases on the dialog using the info in the book's aliases dict'''
        aliases_widget = QWidget()
        aliases_layout = QGridLayout(aliases_widget)
        aliases_layout.setAlignment(Qt.AlignTop)

        # add aliases for current book
        for index, (character, aliases) in enumerate(sorted(self.book.aliases.items())):
            label = QLabel(character + ':')
            label.setFixedWidth(150)
            aliases_layout.addWidget(label, index, 0)
            line_edit = QLineEdit(', '.join([self.TITLE_CASE(alias) for alias in aliases]))
            line_edit.setFixedWidth(350)
            line_edit.textEdited.connect(functools.partial(self.edit_aliases, character))
            aliases_layout.addWidget(line_edit, index, 1)

        self._scroll_area.setWidget(aliases_widget) 
开发者ID:szarroug3,项目名称:X-Ray_Calibre_Plugin,代码行数:19,代码来源:book_config.py

示例13: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def __init__(self, parent=None):
        super(LateralMenu, self).__init__(parent)
        self.setLayout(QVBoxLayout())
        self.layout().setContentsMargins(0, 0, 0, 0)
        self.top_frame = QFrame()
        # size_policy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
        # self.frame.setSizePolicy(size_policy)
        # self.top_frame.setFixedWidth(90)
        self.top_frame.setFrameStyle(QFrame.NoFrame)
        self.top_frame_layout = QVBoxLayout()
        self.top_frame_layout.setContentsMargins(2, 2, 2, 2)
        self.top_frame_layout.setAlignment(Qt.AlignTop)
        self.top_frame.setLayout(self.top_frame_layout)

        self.bottom_frame = QFrame()
        # self.bottom_frame.setFixedWidth(90)
        self.bottom_frame.setFrameStyle(QFrame.NoFrame)
        self.bottom_frame_layout = QVBoxLayout()
        self.bottom_frame_layout.setContentsMargins(2, 2, 2, 2)
        self.bottom_frame_layout.setAlignment(Qt.AlignBottom)
        self.bottom_frame.setLayout(self.bottom_frame_layout)

        self.layout().addWidget(self.top_frame)
        self.layout().addWidget(self.bottom_frame)
        self.items = [] 
开发者ID:haruiz,项目名称:CvStudio,代码行数:27,代码来源:lateral_menu.py

示例14: customTopAxisX

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def customTopAxisX(chart):
    # 自定义top x轴
    series = chart.series()
    if not series:
        return
    category = ["%d月" % i for i in range(1, 9)]  # 1-8月
    axisx = QCategoryAxis(
        chart, labelsPosition=QCategoryAxis.AxisLabelsPositionOnValue)
    axisx.setGridLineVisible(False)  # 隐藏网格线条
    axisx.setTickCount(len(category))  # 设置刻度个数
    chart.axisX().setTickCount(len(category))  # 强制修改x轴的刻度个数一致
    minx = chart.axisX().min()
    maxx = chart.axisX().max()
    tickc = chart.axisX().tickCount()
    step = (maxx - minx) / (tickc - 1)  # tickc>=2
    for i in range(0, tickc):
        axisx.append(category[i], minx + i * step)
    chart.addAxis(axisx, Qt.AlignTop)  # 添加到右侧
    series[-1].attachAxis(axisx)  # 附加到series上 
开发者ID:PyQt5,项目名称:PyQt,代码行数:21,代码来源:CustomXYaxis.py

示例15: test_add_base

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AlignTop [as 别名]
def test_add_base(self):
        """Test with add_base=True."""
        flags = debug.qflags_key(Qt, Qt.AlignTop, add_base=True)
        assert flags == 'Qt.AlignTop' 
开发者ID:qutebrowser,项目名称:qutebrowser,代码行数:6,代码来源:test_debug.py


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