fix: worklist dialog error message display incomplete.
This commit is contained in:
@@ -126,6 +126,7 @@ void GetWorkListDialog::initializeContentWidgets()
|
||||
//ErrorLabel
|
||||
contentLayout->addWidget(mErrorLabel);
|
||||
mErrorLabel->setObjectName("warn");
|
||||
mErrorLabel->setWordWrap(true);
|
||||
mErrorLabel->hide();
|
||||
}
|
||||
|
||||
@@ -155,6 +156,10 @@ bool GetWorkListDialog::updateReferenceData()
|
||||
if (accessionNum.isEmpty() && patientId.isEmpty())
|
||||
{
|
||||
mErrorLabel->setText(tr("Accession Number and Patient Id is Empty."));
|
||||
QFont font = mErrorLabel->font();
|
||||
QFontMetrics metrics(font);
|
||||
int width = metrics.width(mErrorLabel->text());
|
||||
mErrorLabel->setFixedHeight(metrics.lineSpacing() * (width / this->width()) + 40 );
|
||||
mErrorLabel->show();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user