I am very new to Qt and I need to simulate a click using the namespace QTestand QTest::mouseClick. My problem is that I would like to click on a record QMenudefined as QAction, but the function mouseClickdoes not allow passing it as an argument (only QWidgetsor QWindows).
QTest
QTest::mouseClick
QMenu
QAction
mouseClick
QWidgets
QWindows
What can i do here?
You can use another method of direct direct triggers of yours QAction's, as far as possible:
QAction's
qAction->trigger();
This should have the same effect as mouse clicks for testing purposes.
A QAction , .
, . QMenu QToolBar, .
QToolBar
, , , , .
Source: https://habr.com/ru/post/1657376/More articles:Grouping overlapping time slots in Oracle - dateОтключить собственный смарт-баннер iOS - jquerySource line TextInputLayout and Spinner - androidDetect C # version at compile time - c #Different optimizations in VS2015 and VS2013 raise a floating point exception - c ++Override @JsonIgnore annotation for some controllers. Jackson Spring - jsonFull screen WPF application crashes when connected via TeamViewer - c #Pandas Slowly. Want the first appearance in a DataFrame - pythonObjective-C General Covariant - genericsКонфигурация и использование журнала Python 3.5.2 - pythonAll Articles