简体   繁体   English

以编程方式将QTimeEdit设置为只读

[英]Programatically set read-only for QTimeEdit

QTimeEdit has a read-only property, which I can set from Designer (it is in the QAbstractSpinBox properties category). QTimeEdit具有一个只读属性,我可以从Designer中对其进行设置(它位于QAbstractSpinBox属性类别中)。

But there is no setReadOnly member in QTimeEdit. 但是QTimeEdit中没有setReadOnly成员。

You can call setReadOnly. 您可以调用setReadOnly。 It is a member of QAbstractSpinBox, which QTimeEdit inherits from. 它是QTimeEdit继承的QAbstractSpinBox的成员。

When looking up documentation for a particular class, don't forget to click the link "List of all members, including inherited members", which will display all of the methods you can call for a given object. 查找特定类的文档时,请不要忘记单击“所有成员的列表,包括继承的成员”链接,该链接将显示您可以为给定对象调用的所有方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM