1

I'm working on a plug-in for QGIS and I'm a bit stuck on a problem with my dialog (realized on Qt Designer).

Indeed, I added a progression bar wich seems to work, but I can't really check this because, when I click on the "OK" button (wich launch the execution of the plugin), my dialog just disappear. Except this, the plug-in work well, so I was wondering if there's a way to keep my dialog - or, at least, a progression bar - displayed during the processing, after the users have clicked on "OK".

I'd would like to show you some codes, but I'm not actually sure of what part is useful to show...

Another problem wich seems to me pretty close from the previous one : I've add to my script some error messages (QMessageBox) displayed when the user click on "OK" when the input fields are not correctly filled.

The messages pops wells, but, when clicking "OK" on the message box, the message box AND the dialog disappear and the user have to launch again the plug-in although I'd rather the user just back on the dialog to fill the input's field.

The code wich display the message box is this one :

if self.dlg.menu_mnt.currentText() == "" : #if combo box is empty 
                    QMessageBox.warning(None, "Temperature Map", str("Veuillez indiquer un raster de MNT valide"))
  • Welcome to GIS SE! As a new user please take the Tour that introduces you to this site and its protocols. Here you are asking more than one question which you should only include one question per question. Also, for the progress bar question please include a code sample where you are showing the bar and then closing it. – artwork21 May 4 '17 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.