代码拉取完成,页面将自动刷新
#include "countcodeWidget.h"
#include "treeview.h"
#include <QVBoxLayout>
#include <QFileIconProvider>
#include <QFile>
#include <QFileInfo>
CountCodeWidget::CountCodeWidget(QWidget *parent)
: QWidget(parent)
, m_treeView(new TreeView(this))
, m_bottomWidget(new QWidget(this))
{
}
CountCodeWidget::~CountCodeWidget()
{
}
void CountCodeWidget::initUi()
{
initForm();
initBottomWidget();
setLabelStyle();
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
mainLayout->addWidget(m_treeView);
mainLayout->addWidget(m_bottomWidget);
onClearData();
}
void CountCodeWidget::initForm()
{
}
void CountCodeWidget::initBottomWidget()
{
}
void CountCodeWidget::setLabelStyle()
{
}
void CountCodeWidget::onClearData()
{
}
QIcon CountCodeWidget::getIcon(QString filename)
{
QFileInfo file_info(filename);
QFileIconProvider file_icon;
QIcon icon = file_icon.icon(file_info);
return icon;
}
QString CountCodeWidget::getElidedText(QFont font, QString str, int MaxWidth)
{
if (str.isEmpty())
return "";
QFontMetrics fontWidth(font);
int width = fontWidth.width(str);
if (width >= MaxWidth)
str = fontWidth.elidedText(str, Qt::ElideRight, MaxWidth);
return str;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。