Qt 6.11 is out! See what's new in the release
blog
QString % symbol
-
How do you add a % symbol to a string built with QString?
For example I have:
QString strStyle(QString("QSlider::groove{background:transparent;}" "QSlider::handle:vertical{" "background:black;" "border-radius:0px" "border:1px solid gray;" "height:%1%}").arg(dblPercentOnView));The % doesn't work.
-
How do you add a % symbol to a string built with QString?
For example I have:
QString strStyle(QString("QSlider::groove{background:transparent;}" "QSlider::handle:vertical{" "background:black;" "border-radius:0px" "border:1px solid gray;" "height:%1%}").arg(dblPercentOnView));The % doesn't work.
@SPlatten , actually its quite simple:
QString strStyle(QString("QSlider::groove{background:transparent;}" "QSlider::handle:vertical{" "background:black;" "border-radius:0px" "border:1px solid gray;" "height:%1%2;}").arg(dblPercentOnView).arg("%")); -
@SPlatten , actually its quite simple:
QString strStyle(QString("QSlider::groove{background:transparent;}" "QSlider::handle:vertical{" "background:black;" "border-radius:0px" "border:1px solid gray;" "height:%1%2;}").arg(dblPercentOnView).arg("%"));@SPlatten said in QString % symbol:
actually its quite simple:
Or even easier with:
QString strStyle(QString("QSlider::groove{background:transparent;}" "QSlider::handle:vertical{" "background:black;" "border-radius:0px" "border:1px solid gray;" "height:%1%;}").arg(dblPercentOnView)); -
@SPlatten said in QString % symbol:
actually its quite simple:
Or even easier with:
QString strStyle(QString("QSlider::groove{background:transparent;}" "QSlider::handle:vertical{" "background:black;" "border-radius:0px" "border:1px solid gray;" "height:%1%;}").arg(dblPercentOnView));@KroMignon , doesn't % denote a parameter expected?
-
@SPlatten , actually its quite simple:
QString strStyle(QString("QSlider::groove{background:transparent;}" "QSlider::handle:vertical{" "background:black;" "border-radius:0px" "border:1px solid gray;" "height:%1%2;}").arg(dblPercentOnView).arg("%"));