Update dialogue_box.py to pop it up front when opening
This commit is contained in:
parent
f76bcb7f79
commit
fe29d2749d
@ -1,5 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
from PyQt6.QtWidgets import QApplication, QInputDialog, QWidget, QLineEdit, QMessageBox
|
from PyQt6.QtWidgets import QApplication, QInputDialog, QWidget, QLineEdit, QMessageBox
|
||||||
|
from PyQt6.QtCore import Qt
|
||||||
|
|
||||||
|
|
||||||
def get_text_input(title, message, widget):
|
def get_text_input(title, message, widget):
|
||||||
@ -56,7 +57,11 @@ def show_message_box(title, message, widget):
|
|||||||
def draw_dialogue_box(title, message, dialogue_box_type):
|
def draw_dialogue_box(title, message, dialogue_box_type):
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
widget = QWidget()
|
widget = QWidget()
|
||||||
widget.setWindowTitle('Password Dialog')
|
widget.setWindowFlag(Qt.WindowType.Window
|
||||||
|
widget.setWindowFlag(Qt.WindowType.WindowStaysOnTopHint)
|
||||||
|
widget.show()
|
||||||
|
widget.raise_()
|
||||||
|
widget.activateWindow()
|
||||||
|
|
||||||
if dialogue_box_type == 'textbox':
|
if dialogue_box_type == 'textbox':
|
||||||
return get_text_input(title, message, widget)
|
return get_text_input(title, message, widget)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user