28   QString uuid = QUuid::createUuid().toString();
 
   30   if ( maxLength <= 0 || maxLength >= uuid.length() )
 
   37     return uuid.replace( 
'-', QString() ).mid( 1, maxLength );
 
   46     v = mLineEdit->text();
 
   55   return new QLineEdit( parent );
 
   60   mLineEdit = qobject_cast<QLineEdit *>( editor );
 
   61   mLabel = qobject_cast<QLabel *>( editor );
 
   63     mLineEdit->setEnabled( 
false );
 
   68   return mLineEdit || mLabel;
 
   71 void QgsUuidWidgetWrapper::updateValues( 
const QVariant &value, 
const QVariantList & )
 
   76     if ( 
field().type() == QVariant::String && 
field().length() > 0 )
 
   82       mLineEdit->setText( uuid );
 
   84       mLabel->setText( uuid );
 
   91       mLineEdit->setText( 
value.toString() );
 
   93       mLabel->setText( 
value.toString() );