代码之家  ›  专栏  ›  技术社区  ›  S Andrew

如何以24小时时钟格式制作qt设计器的QDateTimeEdit小部件

  •  0
  • S Andrew  · 技术社区  · 4 年前

    UI 我正在设计的设计 qt desginer . 在 qt designer ,有一个小部件 QDateTimeEdit

    enter image description here

    我添加了两个widget from start和end date time。我还添加了日历弹出窗口,以便日期,我可以选择使用日历。至于时间,我可以通过在键盘上输入时间来调整时间。

    默认情况下它附带 AM PM

    1 回复  |  直到 4 年前
        1
  •  1
  •   eyllanesc Yonghwan Shin    4 年前

    必须在displayFormat属性中设置QDateTimeEdit的格式:

    enter image description here