PDA

View Full Version : QInput dialog is always opening twice



phillip_Qt
13th November 2009, 11:57
Hi All
I'm writing an application, where i've a tree widget. on right click that widget a pop up menu should come which ll having 2 option (add class, and add computer). if i click on add class a QInputDialog ll appear which ll ask the name of classroom. But while right click on the tree widget, it is not triggering the context menu 1st time. and if u select the context menu again it ll open QInputDialog 2 times, for 3rd time triggering in context menu it ll be opened the QInputDialog 3 times, and so on. I'm help less, could nt find the problem. I've attched the code. Can any body help me.? I'll be thankful. Plz help. :confused:

yogeshgokul
13th November 2009, 12:29
Hi All
I'm writing an application, where i've a tree widget. on right click that widget a pop up menu should come which ll having 2 option (add class, and add computer). if i click on add class a QInputDialog ll appear which ll ask the name of classroom. But while right click on the tree widget, it is not triggering the context menu 1st time. and if u select the context menu again it ll open QInputDialog 2 times, for 3rd time triggering in context menu it ll be opened the QInputDialog 3 times, and so on. I'm help less, could nt find the problem. I've attched the code. Can any body help me.? I'll be thankful. Plz help. :confused:
I corrected your code.
Please find the attached modified file.

phillip_Qt
13th November 2009, 12:34
I corrected your code.
Please find the attached modified file.

Thank you very much yoesh. It is really a kind help.:)

yogeshgokul
13th November 2009, 12:46
Thank you very much yoesh. It is really a kind help.:)
Have Beer ;)