29   QStringList margins = 
string.split( 
',' );
 
   30   if ( margins.count() != 4 )
 
   34                      margins.at( 1 ).toDouble(),
 
   35                      margins.at( 2 ).toDouble(),
 
   36                      margins.at( 3 ).toDouble() );
 
The QgsMargins class defines the four margins of a rectangle.
QgsMargins()=default
Constructs a margins object with all margins set to 0.
static QgsMargins fromString(const QString &string)
Returns a QgsMargins object decoded from a string, or a null QgsMargins if the string could not be in...
bool isNull() const
Returns true if all margins are is 0; otherwise returns false.
QString toString() const
Returns the margins encoded to a string.
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.