Example #1
0
FBaseDialog::FBaseDialog(QWidget *parent) :
    QDialog(parent)
{
    setWindowFlags(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_DeleteOnClose);
    initData();
    initUI();
    initConnect();
    QString qss = getQssFromFile(QString(":/skin/qss/dialog.qss"));
    setStyleSheet(qss);
}
Example #2
0
    topLayout->addLayout(m_messageLayout);

    QVBoxLayout* mainLayout = new QVBoxLayout;
    mainLayout->addLayout(topLayout);
    mainLayout->addLayout(buttonLayout);
    mainLayout->setSpacing(0);
    mainLayout->setContentsMargins(0, 0, 0, 0);
    contentFrame->setLayout(mainLayout);

    QHBoxLayout* contentlayout = new QHBoxLayout;
    contentlayout->addWidget(contentFrame);
    contentlayout->setContentsMargins(5, 5, 5, 5);
    setLayout(contentlayout);

    resize(m_defaultWidth, m_defaultHeight);
    setStyleSheet(getQssFromFile(":/qss/skin/dialogs/qss/dialogs.qss"));
    initConnect();
}


void DBaseDialog::initConnect(){
    connect(m_buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleButtonsClicked(int)));
    connect(m_closeButton, SIGNAL(clicked()), this, SLOT(close()));
}

QButtonGroup* DBaseDialog::getButtonsGroup(){
    return m_buttonGroup;
}

QVBoxLayout* DBaseDialog::getMessageLayout(){
    return m_messageLayout;
Example #3
0
void setSkinForApp(QString filename)
{
    QString qss = getQssFromFile(filename);
    qApp->setStyleSheet(qss);
}