문제

Im trying to use QInputDialog without buttons. It looks just like I want, but I connot confirm input (using it for text input). Is there a possibility to confirm with the enter key, so that exec() returns QInputDialog::Accepted ? Just like escape key makes the dialog return QInputDialog::Rejected ?

도움이 되었습니까?

해결책

You could installEventFilter() on the QInputDialog, then have the eventFilter() accept() the dialog on a keypressevent(). :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top