En esta página

QTimeEdit Class

La clase QTimeEdit proporciona un widget para editar horas basado en el widget « QDateTimeEdit ». Más información...

Encabezado: #include <QTimeEdit>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
Heredado de: QDateTimeEdit

Funciones públicas

QTimeEdit(QWidget *parent = nullptr)
QTimeEdit(QTime time, QWidget *parent = nullptr)
virtual ~QTimeEdit()

Descripción detallada

Hora editable

Muchas de las propiedades y funciones que ofrece QTimeEdit se implementan en QDateTimeEdit. Estas son las propiedades relevantes de esta clase:

  • time contiene la hora que muestra el widget.
  • minimumTime define la hora mínima (más temprana) que puede establecer el usuario.
  • maximumTime define la hora máxima (más tardía) que puede establecer el usuario.
  • displayFormat contiene una cadena que se utiliza para dar formato a la hora mostrada en el widget.

Véase también QDateEdit y QDateTimeEdit.

Documentación de las funciones de miembro

[explicit] QTimeEdit::QTimeEdit(QWidget *parent = nullptr)

Crea un editor de tiempo vacío con un ` parent`.

[explicit] QTimeEdit::QTimeEdit(QTime time, QWidget *parent = nullptr)

Crea un editor de hora vacío con un objeto de tipo ` parent`. La hora se establece en ` time`.

[virtual noexcept] QTimeEdit::~QTimeEdit()

Destructor.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.