void SelectionModel::setTextAlignment(Qt::Alignment align) { if (align != textAlignment()) { m_alignment = align; emit textAlignmentChanged(); if (!m_items.isEmpty()) { emit dataChanged(index(0), index(m_items.size() - 1)); } } }
void SearchHistoryModel::setTextAlignment(Qt::Alignment align) { if (align != textAlignment()) { m_alignment = align; emit textAlignmentChanged(); if (rowCount() > 0) { emit dataChanged(index(0, 0), index(rowCount() - 1, 0)); } } }