标签:ntc txt his log tchar get trigger else widget
void Widget::on_actFontBold_triggered(bool checked) { QTextCharFormat fmt; fmt = ui->txtEdit->currentCharFormat(); if(checked) fmt.setFontWeight(QFont::Bold); else fmt.setFontWeight(QFont::Normal); ui->txtEdit->mergeCurrentCharFormat(fmt); } void Widget::on_actFontItalic_triggered(bool checked) { ui->txtEdit->setFontItalic(checked); ui->txtEdit->setFocus(); } void Widget::on_actFontUnderline_triggered(bool checked) { ui->txtEdit->setFontUnderline(checked); ui->txtEdit->setFocus(); } void Widget::on_actFont_triggered() {//设置字体颜色 QColor color = QColorDialog::getColor(color, this); if(color.isValid()) { ui->txtEdit->setTextColor(color); ui->txtEdit->setFocus(); } }
标签:ntc txt his log tchar get trigger else widget
原文地址:https://www.cnblogs.com/chenyujie1020/p/14092627.html