What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-13 21:18:15
pyqt open file dialog
import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, \ QPushButton, QVBoxLayout, QFileDialog # you can copy and run this code class MainWindow(QMainWindow): def __init__(self, parent=None):#-------------- super(Main... Add solution -
Python 2021-11-13 17:41:14
list object attributes python
>>> class new_class(): ... def __init__(self, number): ... self.multi = int(number) * 2 ... self.str = str(number) ... >>> a = new_class(2) >>> a.__dict__ {'multi': 4, 'str': '2'} >>> a.__dict__.keys() dict_k... Add solution -
Python 2021-11-09 21:13:22
jwt authentication python flask
from flask import Flask from flask_jwt import JWT, jwt_required, current_identity from werkzeug.security import safe_str_cmp class User(object): def __init__(self, id, username, password): self.id = id self.username = username ... Add solution -
Python 2021-11-09 11:27:09
pyqt create a qmenu on a button click
import sys from PyQt4 import QtGui, QtCore class MainForm(QtGui.QMainWindow): def __init__(self, parent=None): super(MainForm, self).__init__(parent) # create button self.button = QtGui.QPushButton("test button",self... Add solution -
Other 2021-11-09 05:20:15
hwo to run multiple QApplication in pyqt
from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * import time class MainWindow(QMainWindow): def __init__(self, *args, **kwargs): super(MainWindow, self).__init__(*args, **kwargs) self.counter = 0 ... Add solution