Mads Ipsen schrieb: > projetmbc wrote: >> Mads Ipsen a écrit : >>> If you change 'QDialog' to 'QWidget' the problem disappears. But I >>> have no idea why. Anybody? >>> >>> Best regards, >>> >>> Mads >> In the first example proposed that did not work, you can see that the >> button has the focus even if the cursor is in the lineedit. I think >> that the problem comes from here. >> >> >> Christophe. >> > From the manual pages: > > "A dialog's default button is the button that's pressed when the user > presses Enter (Return). This button is used to signify that the user > accepts the dialog's settings and wants to close the dialog." > > In other words, the first button that gets added probably gets connected > up with this behaviour, which explains the behaviour. So using a QWidget > is probably the correct solution: >
Yes, I think so too. Tried it, works, thanks to you both! Sibylle _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt