title: how to set default value of Qdatetimeedit used as qdelegate
body: <p>I'm using QDateTimeEdit as a delegate on my QTableview to show start date and end date. 
  when I try to populate data I receive from database, QDateTimeEdit delegate does not display it.</p>
  
  <p>Here is my code:</p>
  
  <p>Class <code>DateDelegate</code>:</p>
  
  <pre><code>class DateDelegate(QtGui.QItemDelegate):
  
      def __init__(self, parent):
          QtGui.QItemDelegate.__init__(self, parent)
  
      def createEditor(self, parent, option, index):
          self.dateEdit = QtGui.QDateTimeEdit(parent)
          self.dateEdit.setCalendarPopup(True)
          self.dateEdit.setMinimumDate(QtCore.QDate(2014, 03, 01))
          self.dateEdit.setDisplayFormat(_translate("Form", "dd/mm/yyyy", None))
          return self.dateEdit
  
      def setModelData(self, editor, model, index):
          value = self.dateEdit.dateTime().toPyDateTime()
          strDate = value.strftime('%d/%m/%Y') 
          model.setData(index, strDate, QtCore.Qt.EditRole)
  </code></pre>
  
  <p>Class <code>AssetTableModel</code>:</p>
  
  <pre><code>class AssetTableModel(QtCore.QAbstractTableModel):
  
      def __init__(self, assets = [], headers = [], parent = None):
          QtCore.QAbstractTableModel.__init__(self, parent)
          self.__assets = assets
          self.__headers = headers
  
      def rowCount(self, parent):
          return len(self.__assets)
  
      def columnCount(self, parent):
          return len(self.__assets[0])
  
      def flags(self, index):
          return QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsEditable
  
      def data(self, index, role):
          row = index.row()
          column = index.column()
  
          if role == QtCore.Qt.EditRole:
              return self.__assets[row][column]
  
          if role == QtCore.Qt.DisplayRole:
              print self.__assets[row][column]
              return self.__assets[row][column]
  
      def setData(self, index, value, role = QtCore.Qt.EditRole):
          if role == QtCore.Qt.EditRole:
              row = index.row()
              column = index.column()
  
              self.__assets[row][column] = value
              self.dataChanged.emit(index, index)
              return True
          return False
  
      def headerData(self, section, orientation, role):
          if role == QtCore.Qt.DisplayRole:
              if orientation == QtCore.Qt.Horizontal:
                  if section &lt; len(self.__headers):
                      return self.__headers[section]
                  else:
                      return "not implimented"
              else:
                  return "verticle not implimented"
  
  
      def insertRows(self, position, rows, parent = QtCore.QModelIndex()):
          self.beginInsertRows( parent, position, position + rows - 1 )
          for i in range(rows):
              defaultValues = [ "" for c in range( self.columnCount( None ) ) ] 
              self.__assets.insert( position, defaultValues )
          self.endInsertRows()
          return True
  </code></pre>
  
  <p>Class <code>AssetWidget</code>:</p>
  
  <pre><code>class AssetWidget(QtGui.QDialog):
  
      def __init__(self, parent = None):
          super(AssetWidget, self).__init__(parent)
          uic.loadUi(uipath+'/AssetTable.ui', self)
  
          # DB call here 
          self.loadAssetData()
          # db call ends here 
  
          self.model = None
          self.fillCombo(self.assetType)
          self.cellDelegate  = CellDelegate(self)
  
          for i in range(10):
              self.assetTV.setItemDelegateForColumn(i, self.cellDelegate)
  
          self.sDateDelegate = DateDelegate(self)
          self.assetTV.setItemDelegateForColumn(10, self.sDateDelegate )
          self.assetTV.setItemDelegateForColumn(11, self.sDateDelegate)
  
          self.connect(self.assettypeCB, QtCore.SIGNAL("currentIndexChanged(int)"), self.loadAssets )
          self.connect(self.closeBTN , QtCore.SIGNAL("clicked()"), self.close )
          self.connect(self.addRowBTN, QtCore.SIGNAL("clicked()"), self.addRow )
          self.connect(self.assetTV, QtCore.SIGNAL("doubleClicked(QModelIndex)"), self.tableEdited )
          self.show()
  </code></pre>