如何在 QT 中为 QInputDialog 输入密码时设置背景不活动和灰色?我有一个 qmainwindow 应用程序,我想这样做。谢谢你的帮助!:)
bool ok;
QString sPassword = QInputDialog::getText(this, "Enter Password", "Password: ", QLineEdit::Password, "",&ok);
if(ok && QString::compare(sPassword,"goodpassword",Qt::CaseInsensitive)==0)
QApplication::quit();