Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.0
-
None
Description
Widget::Widget(QWidget *parent) : QWidget(parent) , ui(new Ui::Widget) { ui->setupUi(this); //Android,create 10 buttons,click any button, change the size of the font. auto hb = new QHBoxLayout(this); for(auto i=9;i<19;i++){ auto pb = new QPushButton(QString(u8"%1").arg(i),this); hb->addWidget(pb); connect(pb,&QPushButton::clicked,[&,i]{ qApp->setFont(QFont(qApp->font().family(),i)); //setFont(QFont(qApp->font().family(),i)); //Both QApplication::setFont and QWidget::setFont will have the exception. }); } }
The UI has 10 buttons, click any button, change the size of the font.
when setFont is called,the exception occurs in layout.
Both QApplication::setFont and QWidget::setFont will have the exception.