---
This commit is contained in:
@@ -71,7 +71,7 @@ void RecordQuery::UpdateRecordList(const std::vector<DbRecord>& records){
|
||||
<< "通话时长"
|
||||
<< "消息内容";
|
||||
// 设置列表行数和列数
|
||||
int rowCount = records.size();
|
||||
int rowCount = int(records.size());
|
||||
ui->tblRecordList->setRowCount(rowCount); // 设置行数
|
||||
ui->tblRecordList->setColumnCount(column_labels.size()); // 设置列数
|
||||
// 设置水平表头
|
||||
|
||||
@@ -256,6 +256,18 @@
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>开始时间</string>
|
||||
|
||||
@@ -344,6 +344,7 @@ void MainWindow::on_btnSendMessage_clicked() {
|
||||
QString number = ui->cmbMessageNumber->currentText();
|
||||
if (number.isEmpty()) {
|
||||
QMessageBox::information(this, "错误", "请输入电话号码");
|
||||
return;
|
||||
}
|
||||
// TODO: 检查电话号码格式是否满足要求,比如长度
|
||||
|
||||
@@ -351,6 +352,7 @@ void MainWindow::on_btnSendMessage_clicked() {
|
||||
QString message = ui->txtMessageContent->toPlainText();
|
||||
if (message.isEmpty()) {
|
||||
QMessageBox::information(this, "错误", "请输入要发送的消息");
|
||||
return;
|
||||
}
|
||||
// 检查消息长度
|
||||
if (message.length() > 140) {
|
||||
|
||||
@@ -252,6 +252,9 @@
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>读取状态</string>
|
||||
|
||||
Reference in New Issue
Block a user