From ffa46fd251e52903afa7f04ed3e2ad0574072a08 Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Tue, 20 Mar 2012 21:31:38 +0800 Subject: [PATCH] ExamplesWelcomePage: Fix wordwrap of description text Change-Id: Ibce8a4cc32f5bcaa30f9a5b5376f7e64f367455a Reviewed-by: Thomas Hartmann --- src/plugins/qtsupport/gettingstartedwelcomepage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index af8ef3bd275..96fe2eac284 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -326,6 +326,10 @@ QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileI QLabel *descrLbl = new QLabel; d.setWindowTitle(tr("Copy Project to writable Location?")); descrLbl->setTextFormat(Qt::RichText); + descrLbl->setWordWrap(false); + const QString nativeProjectDir = QDir::toNativeSeparators(projectDir); + descrLbl->setText(QString::fromLatin1("
%1
").arg(nativeProjectDir)); + descrLbl->setMinimumWidth(descrLbl->sizeHint().width()); descrLbl->setWordWrap(true); descrLbl->setText(tr("

The project you are about to open is located in the " "write-protected location:

%1
" @@ -333,7 +337,7 @@ QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileI "to open a modifiable copy of the project or click \"Keep Project and Open\" " "to open the project in location.

Note: You will not " "be able to alter or compile your project in the current location.

") - .arg(QDir::toNativeSeparators(projectDir))); + .arg(nativeProjectDir)); lay->addWidget(descrLbl, 0, 0, 1, 2); QLabel *txt = new QLabel(tr("&Location:")); Utils::PathChooser *chooser = new Utils::PathChooser;