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


Python QComboBox.lineEdit方法代码示例

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


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

示例1: MainWindow

# 需要导入模块: from PySide.QtGui import QComboBox [as 别名]
# 或者: from PySide.QtGui.QComboBox import lineEdit [as 别名]

#.........这里部分代码省略.........
        self.sync_button.setStyleSheet("border: 0px;")
        self.sync_button.setToolTip("Sync")
        self.sync_button.clicked.connect(self.sync_clicked)
        self.sync_button.setVisible(False)
        layout.addWidget(self.sync_button)
        self.clipboard_button = QToolButton()
        self.clipboard_button.setIconSize(QSize(30, 30))
        self.clipboard_button.setIcon(QIcon(os.path.join("icons", "ic_action_copy.png")))
        self.clipboard_button.setStyleSheet("border: 0px;")
        self.clipboard_button.setToolTip("in die Zwischenablage")
        self.clipboard_button.clicked.connect(self.copy_to_clipboard)
        self.clipboard_button.setVisible(False)
        layout.addWidget(self.clipboard_button)

    # noinspection PyUnresolvedReferences
    def create_main_area(self, layout):
        # Master password
        master_password_label = QLabel("&Master-Passwort:")
        self.master_password_edit = QLineEdit()
        self.master_password_edit.setEchoMode(QLineEdit.EchoMode.Password)
        self.master_password_edit.textChanged.connect(self.masterpassword_changed)
        self.master_password_edit.returnPressed.connect(self.move_focus)
        self.master_password_edit.editingFinished.connect(self.masterpassword_entered)
        self.master_password_edit.setMaximumHeight(28)
        master_password_label.setBuddy(self.master_password_edit)
        layout.addWidget(master_password_label)
        layout.addWidget(self.master_password_edit)
        # Domain
        domain_label = QLabel("&Domain:")
        self.domain_edit = QComboBox()
        self.domain_edit.setEditable(True)
        self.domain_edit.textChanged.connect(self.domain_changed)
        self.domain_edit.currentIndexChanged.connect(self.domain_changed)
        self.domain_edit.lineEdit().editingFinished.connect(self.domain_entered)
        self.domain_edit.lineEdit().returnPressed.connect(self.move_focus)
        self.domain_edit.setMaximumHeight(28)
        domain_label.setBuddy(self.domain_edit)
        layout.addWidget(domain_label)
        layout.addWidget(self.domain_edit)
        # Username
        self.username_label = QLabel("&Username:")
        self.username_label.setVisible(False)
        self.username_edit = QLineEdit()
        self.username_edit.textChanged.connect(self.username_changed)
        self.username_edit.returnPressed.connect(self.move_focus)
        self.username_edit.setMaximumHeight(28)
        self.username_edit.setVisible(False)
        self.username_label.setBuddy(self.username_edit)
        layout.addWidget(self.username_label)
        layout.addWidget(self.username_edit)
        # Password strength
        self.strength_label = QLabel("&Passwortstärke:")
        self.strength_label.setVisible(False)
        self.strength_selector = PasswordStrengthSelector()
        self.strength_selector.set_min_length(4)
        self.strength_selector.set_max_length(36)
        self.strength_selector.setMinimumHeight(60)
        self.strength_selector.set_length(12)
        self.strength_selector.set_complexity(6)
        self.strength_selector.strength_changed.connect(self.strength_changed)
        self.strength_selector.setVisible(False)
        self.strength_label.setBuddy(self.strength_selector)
        layout.addWidget(self.strength_label)
        layout.addWidget(self.strength_selector)
        # Password
        self.password_label = QLabel("&Passwort:")
开发者ID:pinae,项目名称:ctSESAM-pyside,代码行数:70,代码来源:ctSESAM.py


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