Example #1
0
from PySide2.QtWidgets import (
   QApplication, QWidget, QLineEdit, QPushButton, QHBoxLayout
)

app = QApplication(sys.argv)
window = QWidget()
lineEdit = QLineEdit()
button = QPushButton("Clear")
layout = QHBoxLayout()
layout->addWidget(lineEdit);
layout->addWidget(button);

button.pressed.connect(lineEdit.clear)

window.setLayout(layout);
window.setWindowTitle("Why?");
window.show();
app.exec();
Example #2
0
''' GUI for Random Group Creator using QT '''

import sys
from PySide2.QtWidgets import QApplication, QMainWindow
from random_gui import Ui_MainWindow


class MyQtApp(QMainWindow):
    def __init__(self):
        super(MyQtApp, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)


if __name__ == '__main__':
    app = QApplication(sys.argv)

    window = MyQtApp()
    window.show()

    sys.exit(app.exec())
Example #3
0
            QTimer.single_shot(T0, take_screenshot)
            QTimer.single_shot(T0 * 2, app.closeAllWindows)
    else:
        theme = 'default'

    # Set theme on in itialization
    apply_stylesheet(app, theme + '.xml',
                     invert_secondary=(
                         'light' in theme and 'dark' not in theme),
                     extra=extra)

    frame = RuntimeStylesheets()

    try:
        frame.main.showMaximized()
    except:
        frame.main.show_maximized()

    if hasattr(app, 'exec'):
        app.exec()
    else:
        app.exec_()