'class QPushButton' has no member named 'accessibleName'
-
I had an error while compiling the code,please see below:
i have already include the head file <QPushButton>
the class QPushButton is a derived class of QAbstractButton, and the QAbstractButton is a derived class of QWidget,
i can found the function accessibleName() defined in the head file <qwidget.h>
It looks like everything's ok, why the error reported when compiling?
-
@ChrisW67 said in 'class QPushButton' has no member named 'accessibleName':
Your Qt has been built with QT_NO_ACCESSIBILITY defined.
how can i resolve this problem?
-
the macro QT_NO_ACCESSIBILITY defined in the <QtGui/qtgui-config.h>
i delete the definition, it can compile now.
as you say, this QT environment should bulit with QT_NO_ACCESSIBILITY,
i compared the file <QtGui/qtgui-config.h> in another QT environment, there is no definition for QT_NO_ACCESSIBILITY.thx.
-
What you have done is produce something that might compile, probably will not link (because the actual implementation of these methods is also removed by the same QT_NO_ACCESSIBILITY defines), and if it does will experience unpredictable problems.
You fix this problem by compiling your Qt library without specifying the
-no-feature-accessibility
option to configure (which is how your library seems to have been built).