# -*- coding: utf-8 -*- """ Created on Mon Jan 24 11:26:23 2022 @author: Basics """ from PyQt5.QtWidgets import (QLabel, QDialog, QDialogButtonBox, QVBoxLayout) class Waiting_window(QDialog): def __init__(self, parent=None): super().__init__(parent) self.setWindowTitle("Wait...") QBtn = QDialogButtonBox.Ok self.buttonBox = QDialogButtonBox(QBtn) self.buttonBox.accepted.connect(self.accept) self.layout = QVBoxLayout() self.message = QLabel('Waiting for the data (should take up to 30 sec)') self.layout.addWidget(self.message) self.layout.addWidget(self.buttonBox) self.setLayout(self.layout) self.show() def setText(self,text): self.message.setText(text)