frontend
1# main.py 2 3import sys 4from PySide6.QtWidgets import QApplication 5from PySide6.QtCore import QTimer # Import QTimer 6from MainWindow import MainWindow 7 8def initialize_main_window(): 9 window = MainWindow() 10 window.setWindowTitle("Json Node Editor") 11 window.setGeometry(100, 100, 800, 600) # Set initial size to 800x600 12 13 # Set up a timer to refresh the map view periodically 14 window.timer = QTimer(window) 15 window.timer.timeout.connect(window.view.update_map_view) 16 window.timer.start(1000) # Refresh every second 17 18 return window 19 20if __name__ == "__main__": 21 app = QApplication(sys.argv) 22 window = initialize_main_window() 23 window.show() 24 sys.exit(app.exec())
def
initialize_main_window():
9def initialize_main_window(): 10 window = MainWindow() 11 window.setWindowTitle("Json Node Editor") 12 window.setGeometry(100, 100, 800, 600) # Set initial size to 800x600 13 14 # Set up a timer to refresh the map view periodically 15 window.timer = QTimer(window) 16 window.timer.timeout.connect(window.view.update_map_view) 17 window.timer.start(1000) # Refresh every second 18 19 return window