PDA

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



bluscape
11th September 2015, 02: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?

ChrisW67
12th September 2015, 03: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
dialog->setCursor(...);
#endif

bluscape
14th September 2015, 23: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?

ChrisW67
15th September 2015, 11: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).

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