【问题标题】:QLineEdit Clear Text on Click and Read Text from Button [closed]QLineEdit 单击时清除文本并从按钮读取文本[关闭]
【发布时间】:2020-10-30 20:20:32
【问题描述】:

当用户单击该字段时,我希望清除我在 QLineEdit 上为 GUI 表单编写的文本。我还希望其中一个字段是 ****,因为它将代表密码字段。

最后,当用户点击按钮时,如何获取字段中的文本。

谢谢。

【问题讨论】:

    标签: c++ qt qt-creator


    【解决方案1】:

    关于密码的部分问题请看QLineEdit::EchoModehttps://doc.qt.io/qt-5/qlineedit.html#EchoMode-enum)。有QLineEdit::PasswordQLineEdit::PasswordEchoOnEdit,你可能会感兴趣。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-27
      • 1970-01-01
      • 2014-06-25
      • 2021-11-23
      • 2012-02-04
      • 2019-06-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多