mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Закончил стилизацию css
This commit is contained in:
@@ -38,32 +38,3 @@ void CommonView::setItemColor(QTreeWidgetItem *item, QColor color)
|
||||
for (int i = 0; i < item->columnCount(); i++)
|
||||
item->setBackground(i, color);
|
||||
}
|
||||
|
||||
void CommonView::updateMyStyleSheet()
|
||||
{
|
||||
QString styleSheet = loadStyleSheet();
|
||||
styleSheet = styleSheet.replace("\n", "");
|
||||
treeWidget->setStyleSheet(styleSheet);
|
||||
|
||||
//QString style = treeWidget->styleSheet();
|
||||
//int i = 0;
|
||||
}
|
||||
|
||||
QString CommonView::loadStyleSheet()
|
||||
{
|
||||
QString fileName = "./styleSheetTreeWidget.css";
|
||||
QFile styleSheetTreeWidgetFile(fileName);
|
||||
if (!styleSheetTreeWidgetFile.open(QFile::ReadOnly | QFile::Text))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Attention!"), tr("The file could not be opened ") + fileName);
|
||||
return QStringLiteral("");
|
||||
}
|
||||
else
|
||||
{
|
||||
QByteArray byteArray = styleSheetTreeWidgetFile.readAll();
|
||||
styleSheetTreeWidgetFile.close();
|
||||
|
||||
QString style = byteArray;
|
||||
return style;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user