Пример #1
0
void AboutDialog::initUI()
{
    normalSize = QSize(400, 300);

    FShadowLabel *logoLabel = new FShadowLabel(tr("QFramer"));
    logoLabel->setObjectName(QString("logoLabel"));

    FShadowLabel *infoLabel = new FShadowLabel(tr("Faster Easier Stronger Prettier"));
    infoLabel->setObjectName(QString("content"));

    FShadowLabel *lincenceLabel = new FShadowLabel(tr("lincence: LGPL v3"), this);
    lincenceLabel->setObjectName(QString("content"));

    FShadowLabel *authorLabel = new FShadowLabel(tr("author:dragondjf"));
    authorLabel->setObjectName(QString("content"));


    FShadowLabel *versionLabel = new FShadowLabel(tr("version:0.2.5.0"));
    versionLabel->setObjectName(QString("content"));


    enterButton = new FBasePushButton();
    enterButton->setText(tr("Close"));
    QHBoxLayout* controlLayout = new QHBoxLayout;
    controlLayout->addStretch();
    controlLayout->addWidget(enterButton);
    controlLayout->addSpacing(10);

    QVBoxLayout* mainLayout = (QVBoxLayout*)layout();
    mainLayout->addSpacing(20);
    mainLayout->addWidget(logoLabel);
    mainLayout->addWidget(infoLabel);
    mainLayout->addSpacing(30);
    mainLayout->addWidget(lincenceLabel);
    mainLayout->addWidget(authorLabel);
    mainLayout->addWidget(versionLabel);
    mainLayout->addSpacing(10);
    mainLayout->addLayout(controlLayout);
    mainLayout->addSpacing(10);



}
Пример #2
0
void AboutDialog::initUI()
{
    normalSize = QSize(400, 300);
    QString str = str.fromLocal8Bit("HIS");
    FShadowLabel *logoLabel = new FShadowLabel(str);
    logoLabel->setObjectName(QString("logoLabel"));

    str = str.fromLocal8Bit("制作:清华大学");
    FShadowLabel *authorLabel = new FShadowLabel(str);
    authorLabel->setObjectName(QString("content"));

    str = str.fromLocal8Bit("版本:V1.0");
    FShadowLabel *versionLabel = new FShadowLabel(str);
    versionLabel->setObjectName(QString("content"));


    //enterButton = new FBasePushButton();
    //enterButton->setText(tr("Close"));
//     QHBoxLayout* controlLayout = new QHBoxLayout;
//     controlLayout->addStretch();
//   controlLayout->addWidget(enterButton);
//   controlLayout->addSpacing(10);

    QVBoxLayout* mainLayout = (QVBoxLayout*)layout();
    mainLayout->addSpacing(15);
    mainLayout->addWidget(logoLabel);
    mainLayout->addSpacing(15);
    mainLayout->addWidget(versionLabel);
    mainLayout->addSpacing(15);
    mainLayout->addWidget(authorLabel);
    /* mainLayout->addSpacing(10);*/
//     mainLayout->addLayout(controlLayout);
//     mainLayout->addSpacing(10);

}