當前位置: 首頁>>代碼示例>>Python>>正文


Python QtWidgets.QGroupBox方法代碼示例

本文整理匯總了Python中PyQt5.QtWidgets.QGroupBox方法的典型用法代碼示例。如果您正苦於以下問題:Python QtWidgets.QGroupBox方法的具體用法?Python QtWidgets.QGroupBox怎麽用?Python QtWidgets.QGroupBox使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PyQt5.QtWidgets的用法示例。


在下文中一共展示了QtWidgets.QGroupBox方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _logInfoWidget

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def _logInfoWidget(self):
        group = QGroupBox()
        group.setTitle(catalog.i18nc("@title:groupbox", "Logs"))
        layout = QVBoxLayout()

        text_area = QTextEdit()
        tmp_file_fd, tmp_file_path = tempfile.mkstemp(prefix = "cura-crash", text = True)
        os.close(tmp_file_fd)
        with open(tmp_file_path, "w", encoding = "utf-8") as f:
            faulthandler.dump_traceback(f, all_threads=True)
        with open(tmp_file_path, "r", encoding = "utf-8") as f:
            logdata = f.read()

        text_area.setText(logdata)
        text_area.setReadOnly(True)

        layout.addWidget(text_area)
        group.setLayout(layout)

        self.data["log"] = logdata

        return group 
開發者ID:Ultimaker,項目名稱:Cura,代碼行數:24,代碼來源:CrashHandler.py

示例2: _createIndicatorGroupBox

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def _createIndicatorGroupBox(self):
        indicatorGroupBox = QGroupBox('指標')

        grid = QGridLayout()
        grid.setSpacing(10)

        rowNbr = 4
        self._indicatorCheckBoxList = []
        for i, indicator in enumerate(DyStockDataCommon.dayIndicators):
            checkBox = QCheckBox(indicator)
            checkBox.setChecked(True)

            grid.addWidget(checkBox, i//rowNbr, i%rowNbr)

            self._indicatorCheckBoxList.append(checkBox)

        indicatorGroupBox.setLayout(grid)

        return indicatorGroupBox 
開發者ID:moyuanz,項目名稱:DevilYuan,代碼行數:21,代碼來源:DyStockDataHistDaysManualUpdateDlg.py

示例3: add_source

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def add_source(self, name, keys):
        if not self.sources.get(name):
            self.sources[name] = {}
            for key in keys:
                self.sources[name][key[1]] = ""

        sourceBox = QtWidgets.QGroupBox(name)
        sourceBox.layout = QtWidgets.QGridLayout()
        sourceBox.layout.setColumnMinimumWidth(0, 150)
        sourceBox.setLayout(sourceBox.layout)

        for count, key in enumerate(keys):
            keyLine = KeyLine(name, key[1], self.sources, self.write_keys)
            sourceBox.layout.addWidget(QtWidgets.QLabel(key[0]), count, 0)
            sourceBox.layout.addWidget(keyLine, count, 1)

        self.scrollWidget.layout.addWidget(sourceBox) 
開發者ID:ScriptSmith,項目名稱:reaper,代碼行數:19,代碼來源:keys.py

示例4: wrap_in_groupbox

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def wrap_in_groupbox(item, title) -> QtWidgets.QGroupBox:
    """
    Shortcut for putting a widget or a layout into a QGroupBox (with a title). Returns the group box.

    :param item: Widget or Layout to wrap.
    :param title: Title string of the group box.
    :return: Group box
    """
    box = QtWidgets.QGroupBox(title)
    if isinstance(item, QtWidgets.QWidget):
        # we use a standard BoxLayout
        layout = QtWidgets.QVBoxLayout(box)
        layout.addWidget(item)
    elif isinstance(item, QtWidgets.QLayout):
        box.setLayout(item)
    return box 
開發者ID:Trilarion,項目名稱:imperialism-remake,代碼行數:18,代碼來源:qt.py

示例5: _ui_tabs_mp3gen_lame

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def _ui_tabs_mp3gen_lame(self):
        """Returns the "LAME Transcoder" input group."""

        flags = QtWidgets.QLineEdit()
        flags.setObjectName('lame_flags')
        flags.setPlaceholderText("e.g. '-q 5' for medium quality")

        rtr = self._addon.router
        vert = QtWidgets.QVBoxLayout()
        vert.addWidget(Note("Specify flags passed to lame when making MP3s."))
        vert.addWidget(flags)
        vert.addWidget(Note("Affects %s. Changes are not retroactive to old "
                            "files." %
                            ', '.join(rtr.by_trait(rtr.Trait.TRANSCODING))))

        group = QtWidgets.QGroupBox("LAME Transcoder")
        group.setLayout(vert)
        return group 
開發者ID:AwesomeTTS,項目名稱:awesometts-anki-addon,代碼行數:20,代碼來源:configurator.py

示例6: _ui_tabs_advanced_presets

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def _ui_tabs_advanced_presets(self):
        """Returns the "Presets" input group."""

        presets_button = QtWidgets.QPushButton("Manage Presets...")
        presets_button.clicked.connect(self._on_presets)

        groups_button = QtWidgets.QPushButton("Manage Groups...")
        groups_button.clicked.connect(self._on_groups)

        hor = QtWidgets.QHBoxLayout()
        hor.addWidget(presets_button)
        hor.addWidget(groups_button)
        hor.addStretch()

        vert = QtWidgets.QVBoxLayout()
        vert.addWidget(Note("Setup services for easy access, menu playback, "
                            "randomization, or fallbacks."))
        vert.addLayout(hor)

        group = QtWidgets.QGroupBox("Service Presets and Groups")
        group.setLayout(vert)
        return group 
開發者ID:AwesomeTTS,項目名稱:awesometts-anki-addon,代碼行數:24,代碼來源:configurator.py

示例7: __init__

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [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

示例8: __init__

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [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

示例9: __init__

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [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

示例10: __init__

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [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

示例11: __init__

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [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

示例12: createType

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def createType(self, z):
        self.Settings = QtWidgets.QGroupBox(globals.trans.string('ZonesDlg', 76))
        self.Zone_settings = []
        
        ZoneSettingsLeft = QtWidgets.QFormLayout()
        ZoneSettingsRight = QtWidgets.QFormLayout()
        settingsNames = globals.trans.stringList('ZonesDlg', 77)
        
        for i in range(0, 8):
            self.Zone_settings.append(QtWidgets.QCheckBox())
            self.Zone_settings[i].setChecked(z.type & (2 ** i))

            if i < 4:
                ZoneSettingsLeft.addRow(settingsNames[i], self.Zone_settings[i])
            else:
                ZoneSettingsRight.addRow(settingsNames[i], self.Zone_settings[i])
            
        ZoneSettingsLayout = QtWidgets.QHBoxLayout()
        ZoneSettingsLayout.addLayout(ZoneSettingsLeft)
        ZoneSettingsLayout.addStretch()
        ZoneSettingsLayout.addLayout(ZoneSettingsRight)
        
        self.Settings.setLayout(ZoneSettingsLayout) 
開發者ID:aboood40091,項目名稱:Miyamoto,代碼行數:25,代碼來源:dialogs.py

示例13: setScale

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def setScale(self, scale):
        self.group_box.setMaximumWidth(int(340 * scale))
        self.label['actualfreq'].setMinimumWidth(int(100 * scale))
        self.label['actualfreq'].setMinimumWidth(int(100 * scale))
        self.label['returnloss'].setMinimumWidth(int(80 * scale))
        if self.coloredText:
            color_string = QtCore.QVariant(self.color)
            color_string.convert(QtCore.QVariant.String)
            self.group_box.setStyleSheet(
                f"QGroupBox {{ color: {color_string.value()}; "
                f"font-size: {self._size_str()}}};"
            )
        else:
            self.group_box.setStyleSheet(
                f"QGroupBox {{ font-size: {self._size_str()}}};"
            ) 
開發者ID:NanoVNA-Saver,項目名稱:nanovna-saver,代碼行數:18,代碼來源:Widget.py

示例14: setColor

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def setColor(self, color):
        if color.isValid():
            self.color = color
            p = self.btnColorPicker.palette()
            p.setColor(QtGui.QPalette.ButtonText, self.color)
            self.btnColorPicker.setPalette(p)
        if self.coloredText:
            color_string = QtCore.QVariant(color)
            color_string.convert(QtCore.QVariant.String)
            self.group_box.setStyleSheet(
                f"QGroupBox {{ color: {color_string.value()}; "
                f"font-size: {self._size_str()}}};"
            )
        else:
            self.group_box.setStyleSheet(
                f"QGroupBox {{ font-size: {self._size_str()}}};"
            ) 
開發者ID:NanoVNA-Saver,項目名稱:nanovna-saver,代碼行數:19,代碼來源:Widget.py

示例15: initUI

# 需要導入模塊: from PyQt5 import QtWidgets [as 別名]
# 或者: from PyQt5.QtWidgets import QGroupBox [as 別名]
def initUI(self):
        self.setWindowTitle(self.title)
        self.setGeometry(self.left, self.top, self.width, self.height)

        self.uri_box = QLineEdit(self)
        go_button = QPushButton('Go!', self)
        go_button.clicked.connect(self.handle_entered_uri)
        
        self.main_box = QGroupBox("Bitcoin Payment Protocol Interface")
        main_layout = QGridLayout()
        main_layout.addWidget(QLabel("Bitcoin URI:"), 0, 0)
        main_layout.addWidget(self.uri_box, 0, 1)
        main_layout.addWidget(go_button, 0, 2)
        
        self.payment_data_box = QGroupBox()
        main_layout.addWidget(self.payment_data_box, 1, 1)
        
        self.main_box.setLayout(main_layout)
        
        windowLayout = QVBoxLayout()
        windowLayout.addWidget(self.main_box)
        self.setLayout(windowLayout)

        self.show() 
開發者ID:achow101,項目名稱:payment-proto-interface,代碼行數:26,代碼來源:gui.py


注:本文中的PyQt5.QtWidgets.QGroupBox方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。