Python PyQt5.QtWidgets.QLineEdit() Examples
The following are 30 code examples for showing how to use PyQt5.QtWidgets.QLineEdit(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.
You may check out the related API usage on the sidebar.
You may also want to check out all available functions/classes of the module
PyQt5.QtWidgets
, or try the search function
.
Example 1
Project: ANGRYsearch Author: DoTheEvo File: angrysearch.py License: GNU General Public License v2.0 | 7 votes |
def __init__(self, setting_params=None): super().__init__() self.setting_params = setting_params self.search_input = Qw.QLineEdit() self.table = AngryTableView(self.setting_params['angrysearch_lite'], self.setting_params['row_height']) self.upd_button = Qw.QPushButton('update') self.fts_checkbox = Qw.QCheckBox() grid = Qw.QGridLayout() grid.setSpacing(10) grid.addWidget(self.search_input, 1, 1) grid.addWidget(self.fts_checkbox, 1, 3) grid.addWidget(self.upd_button, 1, 4) grid.addWidget(self.table, 2, 1, 4, 4) self.setLayout(grid) self.setTabOrder(self.search_input, self.table) self.setTabOrder(self.table, self.upd_button) # THE MAIN APPLICATION WINDOW WITH THE STATUS BAR AND LOGIC # LOADS AND SAVES QSETTINGS FROM ~/.config/angrysearch # INITIALIZES AND SETS GUI, WAITING FOR USER INPUTS
Example 2
Project: dcc Author: amimo File: resourceswindow.py License: Apache License 2.0 | 7 votes |
def __init__(self, parent=None, win=None, session=None): super(ResourcesWindow, self).__init__(parent) self.mainwin = win self.session = session self.title = "Resources" self.filterPatternLineEdit = QtWidgets.QLineEdit() self.filterPatternLabel = QtWidgets.QLabel("&Filter resource integer pattern:") self.filterPatternLabel.setBuddy(self.filterPatternLineEdit) self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged) self.resourceswindow = ResourcesValueWindow(self, win, session) sourceLayout = QtWidgets.QVBoxLayout() sourceLayout.addWidget(self.resourceswindow) sourceLayout.addWidget(self.filterPatternLabel) sourceLayout.addWidget(self.filterPatternLineEdit) self.setLayout(sourceLayout)
Example 3
Project: ANGRYsearch Author: DoTheEvo File: angrysearch.py License: GNU General Public License v2.0 | 6 votes |
def exclude_dialog(self): text, ok = Qw.QInputDialog.getText( self, '~/.config/angrysearch/', 'Directories to be ignored:', Qw.QLineEdit.Normal, self.exclud_dirs) if ok: text = text.strip() self.exclud_dirs = text self.settings.setValue('directories_excluded', text) self.parent().setting_params['directories_excluded'] = text.strip().split() if text == '': self.excluded_dirs_btn.setText('none') self.excluded_dirs_btn.setStyleSheet('color:#888;' 'font:italic;') else: self.excluded_dirs_btn.setText(text) self.excluded_dirs_btn.setStyleSheet('') self.OK_button.setFocus()
Example 4
Project: idasec Author: RobinDavid File: custom_widgets.py License: GNU Lesser General Public License v2.1 | 6 votes |
def __init__(self, items, parent=None): super(ButtonLineEdit, self).__init__(parent) self.menu = QtWidgets.QMenu() for i in items: self.menu.addAction(i) self.button = QtWidgets.QToolButton(self) self.button.setStyleSheet('border: 0px; padding: 0px;') self.button.setCursor(QtCore.Qt.ArrowCursor) self.button.triggered.connect(self.menu_action_triggered) self.button.setPopupMode(QtWidgets.QToolButton.InstantPopup) self.button.setMenu(self.menu) frameWidth = self.style().pixelMetric(QtWidgets.QStyle.PM_DefaultFrameWidth) buttonSize = self.button.sizeHint() self.setAlignment(QtCore.Qt.Alignment(QtCore.Qt.AlignHCenter)) self.setStyleSheet('QLineEdit {padding-right: %dpx; }' % (buttonSize.width() + frameWidth + 1)) self.setMinimumSize(max(self.minimumSizeHint().width(), buttonSize.width() + frameWidth*2 + 2), max(self.minimumSizeHint().height(), buttonSize.height() + frameWidth*2 + 2)) self.setMaximumWidth(100)
Example 5
Project: dcc Author: amimo File: stringswindow.py License: Apache License 2.0 | 6 votes |
def __init__(self, parent=None, win=None, session=None): super(StringsWindow, self).__init__(parent) self.mainwin = win self.session = session self.title = "Strings" self.filterPatternLineEdit = QtWidgets.QLineEdit() self.filterPatternLabel = QtWidgets.QLabel("&Filter string pattern:") self.filterPatternLabel.setBuddy(self.filterPatternLineEdit) self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged) self.stringswindow = StringsValueWindow(self, win, session) sourceLayout = QtWidgets.QVBoxLayout() sourceLayout.addWidget(self.stringswindow) sourceLayout.addWidget(self.filterPatternLabel) sourceLayout.addWidget(self.filterPatternLineEdit) self.setLayout(sourceLayout)
Example 6
Project: dcc Author: amimo File: renamewindow.py License: Apache License 2.0 | 6 votes |
def __init__(self, parent=None, win=None, element="", info=()): super(RenameDialog, self).__init__(parent) self.sourceWin = parent self.info = info self.element = element title = "Rename: " + element self.setWindowTitle(title) layout = QtWidgets.QGridLayout() question = QtWidgets.QLabel("Please enter new name:") layout.addWidget(question, 0, 0) self.lineEdit = QtWidgets.QLineEdit() layout.addWidget(self.lineEdit, 0, 1) self.buttonOK = QtWidgets.QPushButton("OK", self) layout.addWidget(self.buttonOK, 1, 1) self.buttonCancel = QtWidgets.QPushButton("Cancel", self) layout.addWidget(self.buttonCancel, 1, 0) self.lineEdit.setText(self.element) self.setLayout(layout) self.buttonCancel.clicked.connect(self.cancelClicked) self.buttonOK.clicked.connect(self.okClicked)
Example 7
Project: dcc Author: amimo File: methodswindow.py License: Apache License 2.0 | 6 votes |
def __init__(self, parent=None, win=None, session=None): super(MethodsWindow, self).__init__(parent) self.mainwin = win self.session = session self.title = "Methods" self.filterPatternLineEdit = QtWidgets.QLineEdit() self.filterPatternLabel = QtWidgets.QLabel("&Filter method name pattern:") self.filterPatternLabel.setBuddy(self.filterPatternLineEdit) self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged) self.methodswindow = MethodsValueWindow(self, win, session) sourceLayout = QtWidgets.QVBoxLayout() sourceLayout.addWidget(self.methodswindow) sourceLayout.addWidget(self.filterPatternLabel) sourceLayout.addWidget(self.filterPatternLineEdit) self.setLayout(sourceLayout)
Example 8
Project: Python_Master_Courses Author: makelove File: input_button_clear.py License: GNU General Public License v3.0 | 6 votes |
def initUI(self): self.inputLabel = QLabel("Input your text") self.editLine = QLineEdit() self.printButton = QPushButton("Print") self.clearButton = QPushButton("Clear") self.printButton.clicked.connect(self.printText) self.clearButton.clicked.connect(self.clearText) inputLayout = QHBoxLayout() inputLayout.addWidget(self.inputLabel) inputLayout.addWidget(self.editLine) buttonLayout = QHBoxLayout() buttonLayout.addWidget(self.printButton) buttonLayout.addWidget(self.clearButton) mainLayout = QVBoxLayout() mainLayout.addLayout(inputLayout) mainLayout.addLayout(buttonLayout) self.setLayout(mainLayout) self.setWindowTitle('FristWindow') self.show()
Example 9
Project: Python-GUI Author: arpitj07 File: scorewidnow.py License: MIT License | 6 votes |
def setupUi(self, ScoreWindow): ScoreWindow.setObjectName("ScoreWindow") ScoreWindow.resize(471, 386) self.centralwidget = QtWidgets.QWidget(ScoreWindow) self.centralwidget.setObjectName("centralwidget") self.Score = QtWidgets.QLineEdit(self.centralwidget) self.Score.setGeometry(QtCore.QRect(180, 180, 113, 22)) self.Score.setObjectName("Score") self.teamscore = QtWidgets.QLabel(self.centralwidget) self.teamscore.setGeometry(QtCore.QRect(180, 130, 151, 20)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.teamscore.setFont(font) self.teamscore.setObjectName("teamscore") ScoreWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(ScoreWindow) self.statusbar.setObjectName("statusbar") ScoreWindow.setStatusBar(self.statusbar) self.retranslateUi(ScoreWindow) QtCore.QMetaObject.connectSlotsByName(ScoreWindow)
Example 10
Project: Lector Author: BasioMeusPuga File: dockwidgets.py License: GNU General Public License v3.0 | 6 votes |
def __init__(self, parent): self.parent = parent self.parentTab = self.parent.parent self.searchThread = BackGroundTextSearch() self.searchOptionsLayout = QtWidgets.QHBoxLayout() self.searchTabLayout = QtWidgets.QVBoxLayout() self.searchTimer = QtCore.QTimer(self.parent) self.searchLineEdit = QtWidgets.QLineEdit(self.parent) self.searchBookButton = QtWidgets.QToolButton(self.parent) self.caseSensitiveSearchButton = QtWidgets.QToolButton(self.parent) self.matchWholeWordButton = QtWidgets.QToolButton(self.parent) self.searchResultsTreeView = QtWidgets.QTreeView(self.parent) self._translate = QtCore.QCoreApplication.translate self.search_string = self._translate('SideDock', 'Search') self.search_book_string = self._translate('SideDock', 'Search entire book') self.case_sensitive_string = self._translate('SideDock', 'Match case') self.match_word_string = self._translate('SideDock', 'Match word') self.create_widgets()
Example 11
Project: networkzero Author: tjguk File: chatter.py License: MIT License | 6 votes |
def __init__(self, name, parent=None): super(Chatter, self).__init__(parent) self.name = name self.text_panel = QtWidgets.QTextEdit() self.text_panel.setReadOnly(True) self.input = QtWidgets.QLineEdit() layout = QtWidgets.QVBoxLayout() layout.addWidget(self.text_panel, 3) layout.addWidget(self.input, 1) self.setLayout(layout) self.setWindowTitle("Chatter") self.input.editingFinished.connect(self.input_changed) self.input.setFocus() self.chattery = nw0.discover("chattery/news") self.responder = FeedbackReader(self.chattery) self.responder.message_received.connect(self.handle_response) self.responder.start()
Example 12
Project: DevilYuan Author: moyuanz File: DySingleEditDlg.py License: MIT License | 6 votes |
def _initUi(self, title, label, default): self.setWindowTitle(title) # 控件 label_ = QLabel(label) self._lineEdit = QLineEdit(str(self._data['data']) if self._data else str(default) ) cancelPushButton = QPushButton('Cancel') okPushButton = QPushButton('OK') cancelPushButton.clicked.connect(self._cancel) okPushButton.clicked.connect(self._ok) # 布局 grid = QGridLayout() grid.setSpacing(10) grid.addWidget(label_, 0, 0, 1, 2) grid.addWidget(self._lineEdit, 0, 2, 1, 2) grid.addWidget(okPushButton, 1, 2, 1, 2) grid.addWidget(cancelPushButton, 1, 0, 1, 2) self.setLayout(grid)
Example 13
Project: DevilYuan Author: moyuanz File: DyProcessNbrDlg.py License: MIT License | 6 votes |
def _initUi(self): self.setWindowTitle('进程数') # 控件 processNbrLable = QLabel('进程数') self._processNbrLineEdit = QLineEdit(str(self._data['nbr']) if self._data else '0' ) cancelPushButton = QPushButton('Cancel') okPushButton = QPushButton('OK') cancelPushButton.clicked.connect(self._cancel) okPushButton.clicked.connect(self._ok) # 布局 grid = QGridLayout() grid.setSpacing(10) grid.addWidget(processNbrLable, 0, 0) grid.addWidget(self._processNbrLineEdit, 1, 0, 1, 2) grid.addWidget(okPushButton, 2, 1) grid.addWidget(cancelPushButton, 2, 0) self.setLayout(grid)
Example 14
Project: DevilYuan Author: moyuanz File: DyStockSelectDayKChartPeriodDlg.py License: MIT License | 6 votes |
def _initUi(self): self.setWindowTitle('日K线前后交易日周期') # 控件 dayKChartPeriodLable = QLabel('股票(指数)日K线前后交易日周期') self._dayKChartPeriodLineEdit = QLineEdit(str(self._data['periodNbr']) if self._data else '60' ) cancelPushButton = QPushButton('Cancel') okPushButton = QPushButton('OK') cancelPushButton.clicked.connect(self._cancel) okPushButton.clicked.connect(self._ok) # 布局 grid = QGridLayout() grid.setSpacing(10) grid.addWidget(dayKChartPeriodLable, 0, 0, 1, 2) grid.addWidget(self._dayKChartPeriodLineEdit, 1, 0, 1, 2) grid.addWidget(okPushButton, 2, 1) grid.addWidget(cancelPushButton, 2, 0) self.setLayout(grid)
Example 15
Project: DevilYuan Author: moyuanz File: DyStockMongoDbConfigDlg.py License: MIT License | 6 votes |
def _createConnectionTab(self, tabWidget): widget = QWidget() labelHost = QLabel('主机') labelPort = QLabel('端口') self._lineEditHost = QLineEdit(self._data['Connection']["Host"]) self._lineEditPort = QLineEdit(str(self._data['Connection']["Port"])) # 布局 grid = QGridLayout() grid.setSpacing(10) grid.addWidget(labelHost, 0, 0) grid.addWidget(self._lineEditHost, 0, 1) grid.addWidget(labelPort, 0, 2) grid.addWidget(self._lineEditPort, 0, 3) widget.setLayout(grid) tabWidget.addTab(widget, "连接")
Example 16
Project: DevilYuan Author: moyuanz File: DyStockWxScKeyConfigDlg.py License: MIT License | 6 votes |
def _initUi(self): self.setWindowTitle('配置-微信(实盘交易)') # 控件 label = QLabel('Sever酱(方糖)的SCKEY ') self._lineEditScKey = QLineEdit(self._data["WxScKey"]) cancelPushButton = QPushButton('Cancel') okPushButton = QPushButton('OK') cancelPushButton.clicked.connect(self._cancel) okPushButton.clicked.connect(self._ok) # 布局 vbox = QVBoxLayout() vbox.addWidget(label) vbox.addWidget(self._lineEditScKey) vbox.addWidget(QLabel(" ")) vbox.addWidget(okPushButton) vbox.addWidget(cancelPushButton) self.setLayout(vbox)
Example 17
Project: attack_monitor Author: yarox24 File: exception_dialog.py License: GNU General Public License v3.0 | 6 votes |
def get_gui_options(self): options = list() for name in self.CONTROLS.keys(): gui_ctrl = self.CONTROLS[name] if gui_ctrl.control_enabled.isChecked(): check_type = gui_ctrl.control_check_type.currentIndex() text = None if isinstance(gui_ctrl.control_value, QtWidgets.QLineEdit): text = gui_ctrl.control_value.text() elif isinstance(gui_ctrl.control_value, QtWidgets.QComboBox): text = gui_ctrl.control_value.currentText() options.append(gui_selection(name, check_type, text)) return options
Example 18
Project: ddt4all Author: cedricp File: ddt4all.py License: GNU General Public License v3.0 | 6 votes |
def __init__(self, ecuscanner): super(Ecu_finder, self).__init__() self.ecuscanner = ecuscanner layoutv = widgets.QVBoxLayout() layouth = widgets.QHBoxLayout() self.setLayout(layoutv) layoutv.addLayout(layouth) self.ecuaddr = widgets.QLineEdit() self.ecuident = widgets.QLineEdit() layouth.addWidget(widgets.QLabel("Addr :")) layouth.addWidget(self.ecuaddr) layouth.addWidget(widgets.QLabel("ID frame :")) layouth.addWidget(self.ecuident) button = widgets.QPushButton("VALIDATE") layouth.addWidget(button) button.clicked.connect(self.check)
Example 19
Project: kawaii-player Author: kanishka-linux File: settings_widget.py License: GNU General Public License v3.0 | 6 votes |
def __init__(self, parent=None, url=None, ui=None, pls_file=None, verify=None, onfinished=None): super(LoginPCToPC, self).__init__(parent) self.ui = ui self.parent = parent self.pls_file = pls_file self.onfinished = onfinished self.text_name = QtWidgets.QLineEdit(self) self.text_pass = QtWidgets.QLineEdit(self) self.text_name.setPlaceholderText('USER') self.text_pass.setPlaceholderText('PASSWORD') self.text_pass.setEchoMode(QtWidgets.QLineEdit.Password) self.btn_login = QPushButtonExtra(self) self.btn_login.setText('Login') self.btn_login.clicked_connect(self.handle_login) self.setWindowTitle('Credentials Required') layout = QtWidgets.QVBoxLayout(self) layout.addWidget(self.text_name) layout.addWidget(self.text_pass) layout.addWidget(self.btn_login) self.url = url self.verify = verify self.show() self.count = 0
Example 20
Project: kawaii-player Author: kanishka-linux File: MyServer.py License: GNU General Public License v3.0 | 6 votes |
def __init__(self, parent=None, server=None): super(LoginWidget, self).__init__(parent) self.parent = parent self.server = server self.server_ip = QtWidgets.QLineEdit(self) self.text_name = QtWidgets.QLineEdit(self) self.text_pass = QtWidgets.QLineEdit(self) self.server_ip.setPlaceholderText('FULL IP ADDRESS OF SERVER') self.text_name.setPlaceholderText('USER') self.text_pass.setPlaceholderText('PASSWORD') if self.server.server_name: self.server_ip.setText(self.server.server_name) self.text_pass.setEchoMode(QtWidgets.QLineEdit.Password) self.btn_login = QtWidgets.QPushButton('Login', self) self.btn_login.clicked.connect(self.handleLogin) self.setWindowTitle('Credentials Required') layout = QtWidgets.QVBoxLayout(self) layout.addWidget(self.server_ip) layout.addWidget(self.text_name) layout.addWidget(self.text_pass) layout.addWidget(self.btn_login) self.auth_info = '' self.auth_64 = '' self.show() self.found = True
Example 21
Project: GROOT Author: ugroot File: notesWindow.py License: Mozilla Public License 2.0 | 6 votes |
def __init__(self,parent=None): super(noteCreationWidgetLayout,self).__init__() #Elements Present on Note Creation GUI self.title = QLabel('Title') self.titleEdit = QLineEdit() self.summary = QLabel('Summary') self.summaryEdit = QTextEdit() self.saveButton = QPushButton("Save") self.saveButton.clicked.connect(self.createNewFile) self.notesList = QPushButton("Notes") self.notesList.clicked.connect(self.createNotesList) #Main Layout self.noteLayout = QGridLayout() #Position of Widgets/Elements on Main Layout self.noteLayout.addWidget(self.title, 1, 0) self.noteLayout.addWidget(self.titleEdit, 1, 1) self.noteLayout.addWidget(self.summary, 2, 0) self.noteLayout.addWidget(self.summaryEdit, 2, 1, 10, 1) self.noteLayout.addWidget(self.saveButton,12,0) self.noteLayout.addWidget(self.notesList,13,0)
Example 22
Project: pkmeter Author: pkkid File: pkmixins.py License: BSD 3-Clause "New" or "Revised" License | 5 votes |
def attribute_echo(self, value): self.assert_widget([QtWidgets.QLineEdit], 'echo') modes = { 'normal': QtWidgets.QLineEdit.Normal, 'noecho': QtWidgets.QLineEdit.NoEcho, 'password': QtWidgets.QLineEdit.Password, 'passwordechoonedit': QtWidgets.QLineEdit.PasswordEchoOnEdit, } if value not in modes: raise ParseError('Unknown echo mode: %s' % value) self.setEchoMode(modes[value.lower()])
Example 23
Project: simnibs Author: simnibs File: main_gui.py License: GNU General Public License v3.0 | 5 votes |
def selectFileLayout(self): self.select_file = QtWidgets.QGroupBox('') layout = QtWidgets.QGridLayout() tag_m2m = QtWidgets.QLabel('<b>m2m Folder:<\\b>') layout.addWidget(tag_m2m, 1, 0, 1, 3) self.m2m_folder_lineEdit = QtWidgets.QLineEdit() layout.addWidget(self.m2m_folder_lineEdit, 2, 0, 1, 3) file_browse_m2m = QtWidgets.QPushButton('Browse') file_browse_m2m.clicked.connect(self.m2mFolderDialog) layout.addWidget(file_browse_m2m,2,3,1,1) tag = QtWidgets.QLabel('<b>Head Mesh:<\\b>') layout.addWidget(tag,3,0,1,3) self.file_name = QtWidgets.QLineEdit() layout.addWidget(self.file_name, 4, 0, 1, 3) file_browse = QtWidgets.QPushButton('Browse') file_browse.clicked.connect(self.fileDialog) layout.addWidget(file_browse, 4, 3, 1, 1) tag_Out = QtWidgets.QLabel('<b>Output Folder:<\\b>') layout.addWidget(tag_Out,5,0,1,3) self.out_folder_lineEdit = QtWidgets.QLineEdit() layout.addWidget(self.out_folder_lineEdit,6,0,1,3) file_browse_out = QtWidgets.QPushButton('Browse') file_browse_out.clicked.connect(self.outFolderDialog) layout.addWidget(file_browse_out,6,3,1,1) self.select_file.setLayout(layout)
Example 24
Project: simnibs Author: simnibs File: main_gui.py License: GNU General Public License v3.0 | 5 votes |
def coilBox(self): box = QtWidgets.QGroupBox("Coil Definition File:") layout = QtWidgets.QGridLayout() coil_line_edit = QtWidgets.QLineEdit() coil_line_edit.textChanged.connect(self.set_coil_fn) layout.addWidget(coil_line_edit,0,0,1,3) file_browse_btn = QtWidgets.QPushButton('Browse') file_browse_btn.clicked.connect(self.coilDialog) layout.addWidget(file_browse_btn,0,3,1,1) box.setLayout(layout) return box, coil_line_edit
Example 25
Project: simnibs Author: simnibs File: simulation_menu.py License: GNU General Public License v3.0 | 5 votes |
def __init__(self, parent, fname_tensor): super(tensorFilesDialog, self).__init__(parent) self.fname = fname_tensor groupBox = QtWidgets.QGroupBox('Tensor File') layout = QtWidgets.QHBoxLayout() groupBox.lineEdit = QtWidgets.QLineEdit() if self.fname is not None: groupBox.lineEdit.setText(self.fname) layout.addWidget(groupBox.lineEdit) groupBox.selectFile = QtWidgets.QPushButton('&Browse') groupBox.selectFile.clicked.connect(lambda: self.selectFile()) layout.addWidget(groupBox.selectFile) groupBox.setLayout(layout) self.group_box = groupBox self.button_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Cancel) self.button_box.accepted.connect(self.accept) self.button_box.rejected.connect(self.reject) mainLayout = QtWidgets.QGridLayout() mainLayout.addWidget(self.group_box) mainLayout.addWidget(self.button_box) self.setLayout(mainLayout) self.setWindowTitle('Tensor file names') self.resize(400,200)
Example 26
Project: simnibs Author: simnibs File: simulation_menu.py License: GNU General Public License v3.0 | 5 votes |
def __init__(self, parent, eeg_cap): super(EEGFileDialog, self).__init__(parent) self.fname = eeg_cap groupBox = QtWidgets.QGroupBox('EEG Cap File') layout = QtWidgets.QHBoxLayout() groupBox.lineEdit = QtWidgets.QLineEdit() if self.fname is not None: groupBox.lineEdit.setText(self.fname) layout.addWidget(groupBox.lineEdit) groupBox.selectFile = QtWidgets.QPushButton('&Browse') groupBox.selectFile.clicked.connect(self.selectFile) layout.addWidget(groupBox.selectFile) groupBox.setLayout(layout) self.group_box = groupBox self.button_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Cancel) self.button_box.accepted.connect(self.accept) self.button_box.rejected.connect(self.reject) mainLayout = QtWidgets.QGridLayout() mainLayout.addWidget(self.group_box) mainLayout.addWidget(self.button_box) self.setLayout(mainLayout) self.setWindowTitle('Tensor file names') self.resize(400,200)
Example 27
Project: dcc Author: amimo File: xrefwindow.py License: Apache License 2.0 | 5 votes |
def __init__(self, parent=None, win=None, xrefs=None, headers=["Origin", "Method"]): super(XrefListView, self).__init__(parent) self.parent = parent self.mainwin = win self.xrefs = xrefs self.headers = headers self.setMinimumSize(600, 400) self.filterPatternLineEdit = QtWidgets.QLineEdit() self.filterPatternLabel = QtWidgets.QLabel("&Filter origin pattern:") self.filterPatternLabel.setBuddy(self.filterPatternLineEdit) self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged) self.xrefwindow = XrefValueWindow(self, win, self.xrefs, self.headers) sourceLayout = QtWidgets.QVBoxLayout() sourceLayout.addWidget(self.xrefwindow) sourceLayout.addWidget(self.filterPatternLabel) sourceLayout.addWidget(self.filterPatternLineEdit) self.setLayout(sourceLayout)
Example 28
Project: qutebrowser Author: qutebrowser File: readlinecommands.py License: GNU General Public License v3.0 | 5 votes |
def __init__(self) -> None: self._deleted = {} # type: typing.MutableMapping[QLineEdit, str]
Example 29
Project: qutebrowser Author: qutebrowser File: readlinecommands.py License: GNU General Public License v3.0 | 5 votes |
def _widget(self) -> typing.Optional[QLineEdit]: """Get the currently active QLineEdit.""" w = QApplication.instance().focusWidget() if isinstance(w, QLineEdit): return w else: return None
Example 30
Project: Python-GUI Author: arpitj07 File: New.py License: MIT License | 5 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(400, 300) self.label = QtWidgets.QLabel(Form) self.label.setGeometry(QtCore.QRect(100, 40, 201, 81)) font = QtGui.QFont() font.setPointSize(9) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.pushButton = QtWidgets.QPushButton(Form) self.pushButton.setGeometry(QtCore.QRect(150, 190, 111, 28)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.pushButton.setFont(font) self.pushButton.setObjectName("pushButton") self.lineEdit = QtWidgets.QLineEdit(Form) self.lineEdit.setGeometry(QtCore.QRect(100, 140, 201, 22)) self.lineEdit.setObjectName("lineEdit") self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)