How can I rollback hour/min/sec from 59
to 00
or vice versa. Actually QDateTimeEdit
doesn't allow it by default and it get stuck after reaching maximum value of 59
if tried pressing up arrow, and same for minimum value 00
.
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
- QGraphicsView / QGraphicsScene size matching
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
- how do I correctly return values from pyqt to Java
You must know that
QDateTimeEdit
is inheritQAbstractSpinBox
, andQAbstractSpinBox
has wrapping mechanism, using it you can make your spins circular. So, all what you must do isin your case, it must be something like this:
ui->dateTimeEdit->setWrapping(true);
If wrapping is
true
stepping up frommaximum()
value will take you to theminimum()
value and vica versa. Wrapping only make sense if you haveminimum()
andmaximum()
values set.See official documentation here .
Good luck!