1QFrame[outer_stylesheet="frame_detail_show"]{..}qtabwidget 里的frame 无法使用
QFrame:frame_detail_show{..}qtabwidget 里的frame 可以的
2.
QSpinBox *spinbox = qobject_cast<QSpinBox *>(qApp->focusWidget());
QKeyEvent * eve1 = new QKeyEvent (QEvent::KeyPress,Qt::Key_1,Qt::NoModifier,"1");
qApp->postEvent((QObject*)spinbox,(QEvent *)eve1);
3.
QByteArray b;
QTextCodec *c=QTextCodec::codecForName("gb2312");//gb2312为转换后的编码
b.append(c->fromUnicode(in));
return b;
4.多色彩颜色失败
p.setBrush(Qt::NoBrush);
p.setPen(QColor("yellow"));
p.drawText(this->rect(), Qt::AlignRight, "100");
p.setPen(QColor("black"));
p.drawText(this->rect(), Qt::AlignRight, "00");
p.setPen(QColor("red"));
p.drawText(this->rect(), Qt::AlignRight, "0");
推断是应为字体边缘本身是有半透明的,所有会出现很明显的描边效果