1 调整病例填写的布局,以达到ui设计的效果;
2 设置调整后的样式
This commit is contained in:
parent
c910593000
commit
31a977e857
Binary file not shown.
@ -10,6 +10,7 @@ MedicalRecordManager::MedicalRecordManager(QWidget * parent):QWidget(parent)
|
||||
initLay();
|
||||
initConnect();
|
||||
initTable();
|
||||
|
||||
m_labMedRecManager.setStyleSheet("QLabel { font-size: 14px;\
|
||||
color: rgb(13,157,219); }\
|
||||
");
|
||||
@ -149,6 +150,19 @@ MedicalRecordManager::MedicalRecordManager(QWidget * parent):QWidget(parent)
|
||||
border-radius:10px;padding:7px 10px;\
|
||||
}");
|
||||
|
||||
|
||||
m_tableWidget.horizontalHeader()->setStyleSheet(
|
||||
"QHeaderView::section{"
|
||||
"border-top:0px solid #E5E5E5;"
|
||||
"border-left:0px solid #E5E5E5;"
|
||||
"border-right:0.5px solid #E5E5E5;"
|
||||
"border-bottom: 0.5px solid #E5E5E5;"
|
||||
"background-color:white;"
|
||||
"padding:4px;"
|
||||
"}"
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
MedicalRecordManager::~MedicalRecordManager()
|
||||
{
|
||||
@ -209,10 +223,17 @@ void MedicalRecordManager::initLay()
|
||||
hlay2->addWidget(&m_btnlastPage);
|
||||
|
||||
QVBoxLayout * vlay = new QVBoxLayout;
|
||||
QWidget * w = new QWidget;
|
||||
|
||||
w->setObjectName("MedicalRecordManager");
|
||||
w->setStyleSheet("QWidget#MedicalRecordManager{background:white;}");
|
||||
vlay->addLayout(hlay);
|
||||
vlay->addWidget(&m_tableWidget);
|
||||
vlay->addLayout(hlay2);
|
||||
setLayout(vlay);
|
||||
w->setLayout(vlay);
|
||||
QVBoxLayout * vlay2 = new QVBoxLayout;
|
||||
vlay2->addWidget(w);
|
||||
vlay2->addLayout(hlay2);
|
||||
setLayout(vlay2);
|
||||
QSize tempSize(80,40);
|
||||
m_btnOpen.setFixedSize(tempSize);
|
||||
m_btnEdit.setFixedSize(tempSize);
|
||||
@ -222,6 +243,20 @@ void MedicalRecordManager::initLay()
|
||||
m_btnUpPage.setFixedSize(tempSize);
|
||||
m_btnNetPage.setFixedSize(tempSize);
|
||||
m_btnlastPage.setFixedSize(tempSize);
|
||||
|
||||
|
||||
this->setStyleSheet("QWidget \
|
||||
{\
|
||||
background-color:white;\
|
||||
border-radius:10px;\
|
||||
}"\
|
||||
);
|
||||
m_tableWidget.setStyleSheet("QWidget \
|
||||
{\
|
||||
background-color:white;\
|
||||
border-radius:10px;\
|
||||
}"\
|
||||
);
|
||||
}
|
||||
bool MedicalRecordManager::initConnect()
|
||||
{
|
||||
@ -264,7 +299,7 @@ void MedicalRecordManager::initTable()
|
||||
m_tableWidget.horizontalHeader()->setSectionResizeMode(3, QHeaderView::ResizeToContents);
|
||||
m_tableWidget.horizontalHeader()->setSectionResizeMode(4, QHeaderView::ResizeToContents);
|
||||
m_tableWidget.setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
m_tableWidget.setShowGrid(true);
|
||||
m_tableWidget.setShowGrid(false);
|
||||
for (int row = 0; row < m_tableWidget.rowCount(); row++)
|
||||
{
|
||||
QTableWidgetItem *item_id = new QTableWidgetItem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user