我想在 QDateTimeEdit() 中添加一个从现在开始 + 7 天的默认日期。
我发现 setDateTime 函数我做不到
dateTimeBegin.setDateTime(datetime.now+7)
或者类似的东西
希望你能帮助我。
提前致谢
最佳答案
尝试以下操作:
currentTime = QDateTime.currentDateTime()
dateTimeBegin.setDateTime(currentTime.addDays(7))
关于python - PyQt5 - 默认日期时间为 QDateTimeEdit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54590150/