Exemplo n.º 1
0
 def noButton2Click(self):
     date, item, result = DateDialog.getDateTime()
     self.lineEdit.setText(date.toString())
     if result == QDialog.Accepted:
         print('点击确定按钮')
     else:
         print('单击取消按钮')
Exemplo n.º 2
0
 def btn2_clicked(self):
     date, time, result = DateDialog.getDateTime()
     self.lineEdit.setText(date.toString())
     if result == QDialog.Accepted:
         print('点击确定按钮')
     else:
         print('点击取消按钮')
Exemplo n.º 3
0
 def onButton2Click(self):
     date, time, result = DateDialog.getDateTime()
     self.lineEdit.setText(date.toString())
     if result == QDialog.Accepted:
         print("点击确认按钮")
     else:
         print("点击取消按钮")
Exemplo n.º 4
0
 def onButton2Click(self):
     date, time, result = DateDialog.getDateTime()
     self.lineEdit.setText(date.toString())
     print('\n日期对话框的返回值')
     print('date=%s' % str(date))
     print('time=%s' % str(date))
     print('result=%s' % result)
Exemplo n.º 5
0
 def onButton2Click(self):
     date, time, result = DateDialog.getDateTime()
     self.lineEdit.setText(date.toString())
     print('\n日期对话框的返回值')
     print('date=%s' % str(date))
     print('time=%s' % str(time))
     print('result=%s' % result)
     if result == QDialog.Accepted:
         print('点击确认按钮')
     else:
         print('点击取消按钮')
 def onButton1Click(self):
     dialog = DateDialog()
     result = dialog.exec()
     date = dialog.dateTime()
     self.lineEdit.setText(date.date().toString())
     # 销毁
     dialog.destroy()
Exemplo n.º 7
0
 def onButton1Click(self):
     dialog = DateDialog(self)
     result = dialog.exec_()
     date = dialog.dateTime()
     self.lineEdit.setText(date.date().toString())
     print('\n日期对话框的返回值')
     print('date=%s' % str(date.date()))
     print('time=%s' % str(date.time()))
     print('result=%s' % result)
     dialog.destroy()
Exemplo n.º 8
0
 def btn1_clicked(self):
     dialog = DateDialog(self)
     result = dialog.exec()
     date = dialog.dateTimedd()
     self.lineEdit.setText(date.date().toString())
     dialog.destroy()