View Full Version : -no-feature-CURSOR - 'class QDialog' has no member named 'setCursor'

11th September 2015, 03:19
I'm using Qt on a ARM embedded linux board. In the past I've cross compiled Qt with the cursor enabled.
I developed several applications that was compiled when the cursor was still enabled.

I recently disabled the cursor (-no-feature-CURSOR) since my applications do not need it.

Now, whenever I clean the project, run qmake and rebuild the project I get an error: error: 'class X' has no member named 'setCursor'

I understand the issue but how can I get rid of it. It will be a massive task to re-create the applications so that is not an option.

Can I somehow update the project to not use the cursor anymore?

12th September 2015, 04:58
All the places in your code that reference functions you have deliberately compiled out of the Qt library have to be either totally removed from your source or #ifdef-ed out of the compilation.

#ifndef QT_NO_CURSOR

15th September 2015, 00:00
Hi Chris,

Thanks for the reply. I did that but unfortunately the cursor code is generated in the form ui header for example ui_mainwindow.h.
These headers are generated by Qt and whenever I clean the project these headers are deleted. When I recompile the headers are re-generated removing all my code.

Any other ideas?

15th September 2015, 12:29
Go into Designer, open your UI file, locate every cursor property attached to a QWidget and ensure that its value is default (i.e. the property name is NOT in bold).

17th September 2015, 02:45
Excellent! That did the trick. Thank you so much!