! Sets the stretch \a factor of \a column. Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see \ref QCPLayoutElement::setMinimumSize, \ref QCPLayoutElement::setMaximumSize, \ref QCPLayoutElement::setSizeConstraintRect.) The default stretch factor of newly
| 4214 | \see setColumnStretchFactors, setRowStretchFactor |
| 4215 | */ |
| 4216 | void QCPLayoutGrid::setColumnStretchFactor(int column, double factor) |
| 4217 | { |
| 4218 | if (column >= 0 && column < columnCount()) |
| 4219 | { |
| 4220 | if (factor > 0) |
| 4221 | mColumnStretchFactors[column] = factor; |
| 4222 | else |
| 4223 | qDebug() << Q_FUNC_INFO << "Invalid stretch factor, must be positive:" << factor; |
| 4224 | } else |
| 4225 | qDebug() << Q_FUNC_INFO << "Invalid column:" << column; |
| 4226 | } |
| 4227 | |
| 4228 | /*! |
| 4229 | Sets the stretch \a factors of all columns. \a factors must have the size \ref columnCount. |
nothing calls this directly
no test coverage detected