31 lines
815 B
Python
31 lines
815 B
Python
import sys
|
|
|
|
from PyQt5.QtWidgets import QApplication, QStackedWidget
|
|
|
|
|
|
from modules.participant import Participant
|
|
from modules.grid import GridDots
|
|
|
|
|
|
class MainWindow(QStackedWidget):
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.participant_widget = Participant()
|
|
self.grid_widget = GridDots()
|
|
self.addWidget(self.participant_widget)
|
|
self.addWidget(self.grid_widget)
|
|
|
|
self.participant_widget.reg_success.connect(self.show_line_widget)
|
|
|
|
def show_line_widget(self):
|
|
"""Method to show widget with index 1 in the stack"""
|
|
self.setCurrentIndex(1) # change to lines not grid later
|
|
|
|
|
|
if __name__ == '__main__':
|
|
app = QApplication(sys.argv)
|
|
window = MainWindow()
|
|
window.setWindowTitle("3Dots")
|
|
window.show()
|
|
sys.exit(app.exec_())
|