Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0 RC2
-
None
-
Qt 5.15, Qt Creator 4.13
Description
auto rb1 = f->findChild<QRadioButton *>("radioButton");
QTest::mouseClick(rb1, Qt::LeftButton);
If rb1 has not been pressed earlier, then rb1->isChecked() return false.
In the documentation for QTest::mouseClick() - The position of the click is defined by pos; the default position is the center of the widget.
If I specify cursor position manualy:
QTest::mouseClick(rb1, Qt::LeftButton, Qt::KeyboardModifiers(), QPoint(rb1->size().width()/2, rb1->size().height()/2));
then it's all right.