문제

I need Qt Dialog with ok and cancel buttons with standard functionality, placed on the right side of its layout. I need to inherit from it and add other widgets to its layout. I can implement it myself, but maybe there is something standard, in that case I prefer to use it, since it will be more portable.

QMessageBox shows a message, I need something more general, only QDialog and standard buttons, or maybe QDialog has an option which activates them.

도움이 되었습니까?

해결책

Subclass QDialog and use a QDialogButtonBox for the standard buttons (docs).

다른 팁

In case you use QT Designer, learnpyqt.com has this nice tutorial in which they describe how to build a QDialog with multiple input fields. QT Designer can be downloaded as described here on stackoverflow in a comment.

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