Paint stop for patent dialog | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Paint stop for patent dialog

Hi I have a QT code base which fails in swig python code for paint event, but I am new to QT. I have a very basic question.What is paint event of QT? Can I stop these events and what happens if I do so? I want to stop paint event when I am opening a new dialog from current dialog and stop it when I am back to parent dialog.

20th Mar 2024, 3:05 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Réponse
+ 2
// In your code where you open a new dialog void MainWindow::openDialog() { // Stop paint events on the parent widget parentWidget->setUpdatesEnabled(false); // Open your dialog Dialog dlg; dlg.exec(); // Re-enable paint events when the dialog is closed parentWidget->setUpdatesEnabled(true); }
24th Mar 2024, 1:02 PM
Meline Davtyan
Meline Davtyan - avatar