Ejemplo n.º 1
0
InfoTab::InfoTab(QWidget *parent)
    : QWidget(parent)
{
    QTextBrowser *info = new QTextBrowser;
    info->setOpenExternalLinks(true);
    info->setFrameShape(QFrame::NoFrame);
    info->setFrameShadow(QFrame::Plain);

    info->setText(
        "<b>QIpMsg</b> &copy; 2007-2010 Yichi Zhang &lt;[email protected]&gt;<br><br>"
        "<b>" + tr("Version: %1").arg(VERSION) + "</b>" +
        "<br>" +
        tr("Compiled with Qt %1").arg(QT_VERSION_STR) + "<br><br>" +
        tr("Visit our web for updates:") + "<br>" +
        link("http://code.google.com/p/qipmsg") +
        "<br><br>" +
        tr("Join qipmsg group to report a bug or request new features:")
        + "<br>" +
        link("http://groups.google.com/group/qipmsg") +
        "<br><br>"
    );

    QPalette p = info->palette();
    p.setColor(QPalette::Base, palette().color(QPalette::Window));
    info->setPalette(p);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(info);

    setLayout(mainLayout);
}
Ejemplo n.º 2
0
ContributorTab::ContributorTab(QWidget *parent)
    : QWidget(parent)
{
    QTextBrowser *contributors = new QTextBrowser;
    contributors->setOpenExternalLinks(true);
    contributors->setFrameShape(QFrame::NoFrame);
    contributors->setFrameShadow(QFrame::Plain);

    contributors->setText(getContributor());

    QPalette p = contributors->palette();
    p.setColor(QPalette::Base, palette().color(QPalette::Window));
    contributors->setPalette(p);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(contributors);

    setLayout(mainLayout);
}