It works...

yeehaa!
This commit is contained in:
robotbrainify 2013-10-12 09:58:26 -04:00
parent 281826f713
commit aef28fd3a5

View File

@ -42,6 +42,7 @@ void MCModInfoFrame::updateWithMod(Mod &m)
}
else
{
desc = m.description();
setModDescription(m.description());
}
}
@ -90,11 +91,13 @@ void MCModInfoFrame::setModDescription(QString text)
if(finaltext.length() > 290)
{
ui->label_ModDescription->setOpenExternalLinks(false);
labeltext.append(finaltext.left(287) + "<a href=\"\">...</a>");
ui->label_ModDescription->setTextFormat(Qt::TextFormat::RichText);
labeltext.append("<html><body>" + finaltext.left(287) + "<a href=\"#mod_desc\">...</a></body></html>");
QObject::connect(ui->label_ModDescription, &QLabel::linkActivated, this, &MCModInfoFrame::modDescEllipsisHandler);
}
else
{
ui->label_ModDescription->setTextFormat(Qt::TextFormat::PlainText);
labeltext.append(finaltext);
}
ui->label_ModDescription->setText(labeltext);
@ -102,6 +105,6 @@ void MCModInfoFrame::setModDescription(QString text)
void MCModInfoFrame::modDescEllipsisHandler(const QString &link)
{
QMessageBox msgbox;
msgbox.setDetailedText(desc);
msgbox.setText(desc);
msgbox.exec();
}