Python PyQt5.QtCore.Qt.WindowContextHelpButtonHint() Examples
The following are 10
code examples of PyQt5.QtCore.Qt.WindowContextHelpButtonHint().
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 also want to check out all available functions/classes of the module
PyQt5.QtCore.Qt
, or try the search function
.
Example #1
Source File: first.py From FIRST-plugin-ida with GNU General Public License v2.0 | 7 votes |
def __init__(self, parent, dialog, **kwargs): super(FIRSTUI.Dialog, self).__init__(parent) self.parent = parent self.data = None self.ui = dialog(**kwargs) self.ui.setupUi(self) self.should_show = self.ui.should_show self.accepted.connect(self.success_callback) self.rejected.connect(self.reject_callback) self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) self.hide_attempts = 0 self.timer = QtCore.QTimer() self.timer.timeout.connect(self.__hide) self.timer.start(500)
Example #2
Source File: utils.py From Dwarf with GNU General Public License v3.0 | 6 votes |
def progress_dialog(message): prgr_dialog = QProgressDialog() prgr_dialog.setFixedSize(300, 50) prgr_dialog.setAutoFillBackground(True) prgr_dialog.setWindowModality(Qt.WindowModal) prgr_dialog.setWindowTitle('Please wait') prgr_dialog.setLabelText(message) prgr_dialog.setSizeGripEnabled(False) prgr_dialog.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) prgr_dialog.setWindowFlag(Qt.WindowContextHelpButtonHint, False) prgr_dialog.setWindowFlag(Qt.WindowCloseButtonHint, False) prgr_dialog.setModal(True) prgr_dialog.setCancelButton(None) prgr_dialog.setRange(0, 0) prgr_dialog.setMinimumDuration(0) prgr_dialog.setAutoClose(False) return prgr_dialog
Example #3
Source File: dwarf_dialog.py From Dwarf with GNU General Public License v3.0 | 5 votes |
def __init__(self, parent=None): super().__init__(parent=parent) self._title = "Dwarf" self.setWindowFlag(Qt.WindowContextHelpButtonHint, False) self.setWindowFlag(Qt.WindowCloseButtonHint, True) # ************************************************************************ # **************************** Properties ******************************** # ************************************************************************
Example #4
Source File: dialogs.py From artisan with GNU General Public License v3.0 | 5 votes |
def __init__(self, parent=None, aw = None): super(ArtisanDialog,self).__init__(parent) self.aw = aw # the Artisan application window # IMPORTANT NOTE: if dialog items have to be access after it has been closed, this Qt.WA_DeleteOnClose attribute # has to be set to False explicitly in its initializer (like in comportDlg) to avoid the early GC and one might # want to use a dialog.deleteLater() call to explicitly have the dialog and its widgets GCe # or rather use sip.delete(dialog) if the GC via .deleteLater() is prevented by a link to a parent object (parent not None) self.setAttribute(Qt.WA_DeleteOnClose, True) # if platf == 'Windows': # setting those Windows flags could be the reason for some instabilities on Windows # windowFlags = self.windowFlags() # #windowFlags &= ~Qt.WindowContextHelpButtonHint # remove help button # #windowFlags &= ~Qt.WindowMaximizeButtonHint # remove maximise button # #windowFlags &= ~Qt.WindowMinMaxButtonsHint # remove min/max combo # #windowFlags |= Qt.WindowMinimizeButtonHint # Add minimize button # windowFlags |= Qt.WindowSystemMenuHint # Adds a window system menu, and possibly a close button # windowFlags |= Qt.WindowMinMaxButtonsHint # add min/max combo # self.setWindowFlags(windowFlags) # configure standard dialog buttons self.dialogbuttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel,Qt.Horizontal) self.dialogbuttons.button(QDialogButtonBox.Ok).setDefault(True) self.dialogbuttons.button(QDialogButtonBox.Ok).setAutoDefault(True) self.dialogbuttons.button(QDialogButtonBox.Cancel).setDefault(False) self.dialogbuttons.button(QDialogButtonBox.Cancel).setAutoDefault(False) self.dialogbuttons.button(QDialogButtonBox.Ok).setFocusPolicy(Qt.StrongFocus) # to add to tab focus switch if self.aw.locale not in self.aw.qtbase_locales: self.dialogbuttons.button(QDialogButtonBox.Ok).setText(QApplication.translate("Button","OK", None)) self.dialogbuttons.button(QDialogButtonBox.Cancel).setText(QApplication.translate("Button","Cancel",None)) # add additional CMD-. shortcut to close the dialog self.dialogbuttons.button(QDialogButtonBox.Cancel).setShortcut(QKeySequence("Ctrl+.")) # add additional CMD-W shortcut to close this dialog (ESC on Mac OS X) cancelAction = QAction(self, triggered=lambda _:self.dialogbuttons.rejected.emit()) try: cancelAction.setShortcut(QKeySequence.Cancel) except: pass self.dialogbuttons.button(QDialogButtonBox.Cancel).addActions([cancelAction])
Example #5
Source File: main.py From pqcom with MIT License | 5 votes |
def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) self.setupUi(self) self.setWindowFlags(self.windowFlags() ^ Qt.WindowContextHelpButtonHint)
Example #6
Source File: main.py From pqcom with MIT License | 5 votes |
def __init__(self, parent=None): super(SetupDialog, self).__init__(parent) self.setupUi(self) self.setWindowFlags(self.windowFlags() ^ Qt.WindowContextHelpButtonHint) self.ports = [] self.refresh() self.portComboBox.clicked.connect(self.refresh)
Example #7
Source File: device_window.py From Dwarf with GNU General Public License v3.0 | 4 votes |
def __init__(self, parent=None, device='local'): super(DeviceWindow, self).__init__(parent=parent) self.spawn_list = None self.proc_list = None self.desktop_geom = None self._dev_bar = None self.setSizeGripEnabled(False) self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) self.setWindowFlag(Qt.WindowContextHelpButtonHint, False) self.setWindowFlag(Qt.WindowCloseButtonHint, True) self.setModal(True) self.device_type = device try: if device == 'local': self.device = frida.get_local_device() self.title = 'Local Session' elif device == 'usb': # TODO: change self.title = 'Android Session' self.device = None elif device == 'ios': self.title = 'iOS Session' self.device = frida.get_usb_device() elif device == 'remote': self.title = 'Remote Session' self.device = frida.get_remote_device() else: self.device = frida.get_local_device() except frida.TimedOutError: self.device = None print('Frida TimedOutError: No Device') self.updated_frida_version = '' self.updated_frida_assets_url = {} self.frida_update_thread = None self.devices_thread = None self.setup_ui()
Example #8
Source File: welcome_window.py From Dwarf with GNU General Public License v3.0 | 4 votes |
def __init__(self, parent=None): super(WelcomeDialog, self).__init__(parent=parent) self._prefs = parent.prefs self._sub_titles = [ ['duck', 'dumb', 'doctor', 'dutch', 'dark', 'dirty', 'debugging'], ['warriors', 'wardrobes', 'waffles', 'wishes', 'worcestershire'], ['are', 'aren\'t', 'ain\'t', 'appears to be'], ['rich', 'real', 'riffle', 'retarded', 'rock'], [ 'as fuck', 'fancy', 'fucked', 'front-ended', 'falafel', 'french fries' ], ] self._update_thread = None # setup size and remove/disable titlebuttons self.desktop_geom = qApp.desktop().availableGeometry() self.setFixedSize(self.desktop_geom.width() * .45, self.desktop_geom.height() * .4) self.setGeometry( QStyle.alignedRect(Qt.LeftToRight, Qt.AlignCenter, self.size(), qApp.desktop().availableGeometry())) self.setSizeGripEnabled(False) self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) self.setWindowFlag(Qt.WindowContextHelpButtonHint, False) self.setWindowFlag(Qt.WindowCloseButtonHint, True) self.setModal(True) self._recent_list_model = QStandardItemModel(0, 2) self._recent_list_model.setHeaderData(0, Qt.Horizontal, 'Type') self._recent_list_model.setHeaderData(1, Qt.Horizontal, 'Path') self._recent_list = DwarfListView(self) self._recent_list.setModel(self._recent_list_model) self._recent_list.header().setSectionResizeMode(0, QHeaderView.ResizeToContents) self._recent_list.header().setSectionResizeMode(1, QHeaderView.Stretch) # setup ui elements self.setup_ui() random.seed(a=None, version=2) self._base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__))) path_to_gitignore = os.path.join(self._base_path, os.pardir, os.pardir, '.gitignore') is_git_version = os.path.exists(path_to_gitignore) if is_git_version and os.path.isfile(path_to_gitignore): self.update_commits_thread = DwarfCommitsThread(parent) self.update_commits_thread.on_update_available.connect( self._on_dwarf_isupdate) self.update_commits_thread.start() # center self.setGeometry( QStyle.alignedRect(Qt.LeftToRight, Qt.AlignCenter, self.size(), qApp.desktop().availableGeometry()))
Example #9
Source File: watchpoints.py From Dwarf with GNU General Public License v3.0 | 4 votes |
def __init__(self, parent=None, ptr=None): super(AddWatchpointDialog, self).__init__(parent=parent) self.setWindowTitle('Add Watchpoint') self.setSizeGripEnabled(False) self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) self.setWindowFlag(Qt.WindowContextHelpButtonHint, False) self.setWindowFlag(Qt.WindowCloseButtonHint, True) self.setWindowFlag(Qt.MSWindowsFixedSizeDialogHint, True) v_box = QVBoxLayout() label = QLabel('Please insert a Pointer') v_box.addWidget(label) self.text_field = InputDialogTextEdit(self) self.text_field.setPlaceholderText( 'Module.findExportByName(\'target\', \'export\')') if ptr: self.text_field.setPlainText(ptr) v_box.addWidget(self.text_field) self.acc_read = QCheckBox('Read') self.acc_read.setChecked(True) self.acc_write = QCheckBox('Write') self.acc_write.setChecked(True) self.acc_execute = QCheckBox('Execute') self.singleshot = QCheckBox('SingleShot') h_box = QHBoxLayout() h_box.addWidget(self.acc_read) h_box.addWidget(self.acc_write) h_box.addWidget(self.acc_execute) v_box.addLayout(h_box) v_box.addWidget(self.singleshot) h_box = QHBoxLayout() self._ok_button = QPushButton('OK') self._ok_button.clicked.connect(self.accept) self._cancel_button = QPushButton('Cancel') self._cancel_button.clicked.connect(self.close) h_box.addWidget(self._ok_button) h_box.addWidget(self._cancel_button) v_box.addLayout(h_box) self.setLayout(v_box) # pylint: disable=invalid-name
Example #10
Source File: syncModOrder.py From mo2-plugins with MIT License | 4 votes |
def __init__(self, organizer, parent = None): self.__modListInfo = {} self.__profilesInfo = {} self.__organizer = organizer super(PluginWindow, self).__init__(parent) self.resize(500, 500) self.setWindowIcon(QtGui.QIcon(':/deorder/syncModOrder')) self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # Vertical Layout verticalLayout = QtWidgets.QVBoxLayout() # Vertical Layout -> Merged Mod List (TODO: Better to use QTreeView and model?) self.profileList = QtWidgets.QTreeWidget() self.profileList.setColumnCount(1) self.profileList.setRootIsDecorated(False) self.profileList.header().setVisible(True) self.profileList.headerItem().setText(0, self.__tr("Profile name")) self.profileList.setContextMenuPolicy(Qt.CustomContextMenu) self.profileList.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.profileList.customContextMenuRequested.connect(self.openProfileMenu) verticalLayout.addWidget(self.profileList) # Vertical Layout -> Button Layout buttonLayout = QtWidgets.QHBoxLayout() # Vertical Layout -> Button Layout -> Refresh Button refreshButton = QtWidgets.QPushButton(self.__tr("&Refresh"), self) refreshButton.setIcon(QtGui.QIcon(':/MO/gui/refresh')) refreshButton.clicked.connect(self.refreshProfileList) buttonLayout.addWidget(refreshButton) # Vertical Layout -> Button Layout -> Close Button closeButton = QtWidgets.QPushButton(self.__tr("&Close"), self) closeButton.clicked.connect(self.close) buttonLayout.addWidget(closeButton) verticalLayout.addLayout(buttonLayout) # Vertical Layout self.setLayout(verticalLayout) # Build lookup dictionary of all profiles self.__profileInfo = self.getProfileInfo() # Build lookup dictionary of mods in current profile self.__modListInfo = self.getModListInfoByPath(os.path.join(self.__organizer.profilePath(), 'modlist.txt')) self.refreshProfileList()