本文整理匯總了Python中PyQt5.QtWidgets.QLineEdit.setInputMethodHints方法的典型用法代碼示例。如果您正苦於以下問題:Python QLineEdit.setInputMethodHints方法的具體用法?Python QLineEdit.setInputMethodHints怎麽用?Python QLineEdit.setInputMethodHints使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyQt5.QtWidgets.QLineEdit
的用法示例。
在下文中一共展示了QLineEdit.setInputMethodHints方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: TextQueue_Ui
# 需要導入模塊: from PyQt5.QtWidgets import QLineEdit [as 別名]
# 或者: from PyQt5.QtWidgets.QLineEdit import setInputMethodHints [as 別名]
class TextQueue_Ui(QWidget):
def __init__(self, persepolis_setting):
super().__init__()
self.persepolis_setting = persepolis_setting
icons = ':/' + \
str(self.persepolis_setting.value('settings/icons')) + '/'
self.setWindowIcon(QIcon.fromTheme('persepolis', QIcon(':/persepolis.svg')))
window_verticalLayout = QVBoxLayout()
self.setLayout(window_verticalLayout)
# queue_tabWidget
self.queue_tabWidget = QTabWidget(self)
window_verticalLayout.addWidget(self.queue_tabWidget)
# links_tab
self.links_tab = QWidget()
links_tab_verticalLayout = QVBoxLayout(self.links_tab)
# link table
self.links_table = QTableWidget(self.links_tab)
links_tab_verticalLayout.addWidget(self.links_table)
self.links_table.setSelectionBehavior(QAbstractItemView.SelectRows)
self.links_table.setEditTriggers(QAbstractItemView.NoEditTriggers)
self.links_table.verticalHeader().hide()
self.links_table.setColumnCount(3)
links_table_header_labels = [
'File Name', 'Download Link', 'dictionary']
self.links_table.setHorizontalHeaderLabels(links_table_header_labels)
self.links_table.setColumnHidden(2, True)
self.links_table.horizontalHeader().setSectionResizeMode(0)
self.links_table.horizontalHeader().setStretchLastSection(True)
# add_queue
add_queue_horizontalLayout = QHBoxLayout()
self.select_all_pushButton = QPushButton(self.links_tab)
add_queue_horizontalLayout.addWidget(self.select_all_pushButton)
self.deselect_all_pushButton = QPushButton(self.links_tab)
add_queue_horizontalLayout.addWidget(self.deselect_all_pushButton)
add_queue_horizontalLayout.addStretch(1)
self.add_queue_label = QLabel(self.links_tab)
add_queue_horizontalLayout.addWidget(self.add_queue_label)
self.add_queue_comboBox = QComboBox(self.links_tab)
add_queue_horizontalLayout.addWidget(self.add_queue_comboBox)
links_tab_verticalLayout.addLayout(add_queue_horizontalLayout)
self.queue_tabWidget.addTab(self.links_tab, "")
# options_tab
self.options_tab = QWidget()
options_tab_verticalLayout = QVBoxLayout(self.options_tab)
# proxy
proxy_verticalLayout = QVBoxLayout()
self.proxy_checkBox = QCheckBox(self.options_tab)
proxy_verticalLayout.addWidget(self.proxy_checkBox)
self.proxy_frame = QFrame(self.options_tab)
self.proxy_frame.setFrameShape(QFrame.StyledPanel)
self.proxy_frame.setFrameShadow(QFrame.Raised)
proxy_gridLayout = QGridLayout(self.proxy_frame)
self.ip_lineEdit = QLineEdit(self.proxy_frame)
self.ip_lineEdit.setInputMethodHints(QtCore.Qt.ImhNone)
proxy_gridLayout.addWidget(self.ip_lineEdit, 0, 1, 1, 1)
self.proxy_pass_label = QLabel(self.proxy_frame)
proxy_gridLayout.addWidget(self.proxy_pass_label, 2, 2, 1, 1)
self.proxy_pass_lineEdit = QLineEdit(self.proxy_frame)
self.proxy_pass_lineEdit.setEchoMode(QLineEdit.Password)
proxy_gridLayout.addWidget(self.proxy_pass_lineEdit, 2, 3, 1, 1)
self.ip_label = QLabel(self.proxy_frame)
proxy_gridLayout.addWidget(self.ip_label, 0, 0, 1, 1)
self.proxy_user_lineEdit = QLineEdit(self.proxy_frame)
proxy_gridLayout.addWidget(self.proxy_user_lineEdit, 0, 3, 1, 1)
self.proxy_user_label = QLabel(self.proxy_frame)
proxy_gridLayout.addWidget(self.proxy_user_label, 0, 2, 1, 1)
self.port_label = QLabel(self.proxy_frame)
proxy_gridLayout.addWidget(self.port_label, 2, 0, 1, 1)
self.port_spinBox = QSpinBox(self.proxy_frame)
self.port_spinBox.setMaximum(9999)
self.port_spinBox.setSingleStep(1)
proxy_gridLayout.addWidget(self.port_spinBox, 2, 1, 1, 1)
proxy_verticalLayout.addWidget(self.proxy_frame)
#.........這裏部分代碼省略.........
示例2: AddLinkWindow_Ui
# 需要導入模塊: from PyQt5.QtWidgets import QLineEdit [as 別名]
# 或者: from PyQt5.QtWidgets.QLineEdit import setInputMethodHints [as 別名]
#.........這裏部分代碼省略.........
options_horizontalLayout = QHBoxLayout()
self.options_pushButton = QPushButton(self)
self.options_pushButton.setFlat(True)
options_horizontalLayout.addWidget(self.options_pushButton)
options_horizontalLayout.addStretch(1)
window_verticalLayout.addLayout(options_horizontalLayout)
# proxy ->
proxy_verticalLayout = QVBoxLayout()
proxy_horizontalLayout = QHBoxLayout()
self.proxy_checkBox = QCheckBox(self)
self.detect_proxy_pushButton = QPushButton(self)
self.detect_proxy_label = QLabel(self)
proxy_horizontalLayout.addWidget(self.proxy_checkBox)
proxy_horizontalLayout.addWidget(self.detect_proxy_label)
proxy_horizontalLayout.addWidget(self.detect_proxy_pushButton)
proxy_verticalLayout.addLayout(proxy_horizontalLayout)
self.proxy_frame = QFrame(self)
self.proxy_frame.setFrameShape(QFrame.StyledPanel)
self.proxy_frame.setFrameShadow(QFrame.Raised)
gridLayout = QGridLayout(self.proxy_frame)
self.ip_lineEdit = QLineEdit(self.proxy_frame)
self.ip_lineEdit.setInputMethodHints(QtCore.Qt.ImhNone)
gridLayout.addWidget(self.ip_lineEdit, 0, 1, 1, 1)
self.proxy_pass_label = QLabel(self.proxy_frame)
gridLayout.addWidget(self.proxy_pass_label, 2, 2, 1, 1)
self.proxy_pass_lineEdit = QLineEdit(self.proxy_frame)
self.proxy_pass_lineEdit.setEchoMode(QLineEdit.Password)
gridLayout.addWidget(self.proxy_pass_lineEdit, 2, 3, 1, 1)
self.ip_label = QLabel(self.proxy_frame)
gridLayout.addWidget(self.ip_label, 0, 0, 1, 1)
self.proxy_user_lineEdit = QLineEdit(self.proxy_frame)
gridLayout.addWidget(self.proxy_user_lineEdit, 0, 3, 1, 1)
self.proxy_user_label = QLabel(self.proxy_frame)
gridLayout.addWidget(self.proxy_user_label, 0, 2, 1, 1)
self.port_label = QLabel(self.proxy_frame)
gridLayout.addWidget(self.port_label, 2, 0, 1, 1)
self.port_spinBox = QSpinBox(self.proxy_frame)
self.port_spinBox.setMaximum(65535)
self.port_spinBox.setSingleStep(1)
gridLayout.addWidget(self.port_spinBox, 2, 1, 1, 1)
proxy_verticalLayout.addWidget(self.proxy_frame)
window_verticalLayout.addLayout(proxy_verticalLayout)
# download UserName & Password ->
download_horizontalLayout = QHBoxLayout()
download_horizontalLayout.setContentsMargins(-1, 10, -1, -1)
示例3: AddLinkWindow_Ui
# 需要導入模塊: from PyQt5.QtWidgets import QLineEdit [as 別名]
# 或者: from PyQt5.QtWidgets.QLineEdit import setInputMethodHints [as 別名]
class AddLinkWindow_Ui(QWidget):
def __init__(self):
super().__init__()
#window
self.resize(475, 465)
sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
self.setSizePolicy(sizePolicy)
self.setMinimumSize(QtCore.QSize(475, 465))
self.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.setWindowIcon(QIcon('icon'))
self.widget = QWidget(self)
self.widget.setGeometry(QtCore.QRect(9, 9, 454, 442))
self.verticalLayout = QVBoxLayout(self)
self.addlink_verticalLayout = QVBoxLayout()
self.addlink_verticalLayout.setContentsMargins(0, 0, 0, 0)
self.link_frame = QFrame(self)
self.link_frame.setFrameShape(QFrame.StyledPanel)
self.link_frame.setFrameShadow(QFrame.Raised)
self.horizontalLayout_2 = QHBoxLayout(self.link_frame)
self.link_horizontalLayout = QHBoxLayout()
#link
self.link_label = QLabel(self.link_frame)
self.link_horizontalLayout.addWidget(self.link_label)
self.link_lineEdit = QLineEdit(self.link_frame)
self.link_horizontalLayout.addWidget(self.link_lineEdit)
self.horizontalLayout_2.addLayout(self.link_horizontalLayout)
self.addlink_verticalLayout.addWidget(self.link_frame)
#proxy
self.proxy_verticalLayout = QVBoxLayout()
self.proxy_checkBox = QCheckBox(self.widget)
self.proxy_verticalLayout.addWidget(self.proxy_checkBox)
self.proxy_frame = QFrame(self.widget)
self.proxy_frame.setFrameShape(QFrame.StyledPanel)
self.proxy_frame.setFrameShadow(QFrame.Raised)
self.gridLayout = QGridLayout(self.proxy_frame)
self.ip_lineEdit = QLineEdit(self.proxy_frame)
self.ip_lineEdit.setInputMethodHints(QtCore.Qt.ImhNone)
self.gridLayout.addWidget(self.ip_lineEdit, 0, 1, 1, 1)
self.proxy_pass_label = QLabel(self.proxy_frame)
self.gridLayout.addWidget(self.proxy_pass_label, 2, 2, 1, 1)
self.proxy_pass_lineEdit = QLineEdit(self.proxy_frame)
self.proxy_pass_lineEdit.setEchoMode(QLineEdit.Password)
self.gridLayout.addWidget(self.proxy_pass_lineEdit, 2, 3, 1, 1)
self.ip_label = QLabel(self.proxy_frame)
self.gridLayout.addWidget(self.ip_label, 0, 0, 1, 1)
self.proxy_user_lineEdit = QLineEdit(self.proxy_frame)
self.gridLayout.addWidget(self.proxy_user_lineEdit, 0, 3, 1, 1)
self.proxy_user_label = QLabel(self.proxy_frame)
self.gridLayout.addWidget(self.proxy_user_label, 0, 2, 1, 1)
self.port_label = QLabel(self.proxy_frame)
self.gridLayout.addWidget(self.port_label, 2, 0, 1, 1)
self.port_spinBox = QSpinBox(self.proxy_frame)
self.port_spinBox.setMaximum(9999)
self.port_spinBox.setSingleStep(1)
self.gridLayout.addWidget(self.port_spinBox, 2, 1, 1, 1)
self.proxy_verticalLayout.addWidget(self.proxy_frame)
self.addlink_verticalLayout.addLayout(self.proxy_verticalLayout)
#download UserName & Password
self.download_horizontalLayout = QHBoxLayout()
self.download_horizontalLayout.setContentsMargins(-1, 10, -1, -1)
self.download_verticalLayout = QVBoxLayout()
self.download_checkBox = QCheckBox(self.widget)
self.download_verticalLayout.addWidget(self.download_checkBox)
self.download_frame = QFrame(self.widget)
self.download_frame.setFrameShape(QFrame.StyledPanel)
self.download_frame.setFrameShadow(QFrame.Raised)
self.gridLayout_2 = QGridLayout(self.download_frame)
self.download_user_lineEdit = QLineEdit(self.download_frame)
self.gridLayout_2.addWidget(self.download_user_lineEdit, 0, 1, 1, 1)
self.download_user_label = QLabel(self.download_frame)
self.gridLayout_2.addWidget(self.download_user_label, 0, 0, 1, 1)
self.download_pass_label = QLabel(self.download_frame)
#.........這裏部分代碼省略.........