Results 1 to 5 of 5

Thread: -no-feature-CURSOR - 'class QDialog' has no member named 'setCursor'

  1. #1

    Default -no-feature-CURSOR - 'class QDialog' has no member named 'setCursor'

    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?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: -no-feature-CURSOR - 'class QDialog' has no member named 'setCursor'

    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.
    Qt Code:
    1. #ifndef QT_NO_CURSOR
    2. dialog->setCursor(...);
    3. #endif
    To copy to clipboard, switch view to plain text mode 

  3. #3

    Default Re: -no-feature-CURSOR - 'class QDialog' has no member named 'setCursor'

    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?

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: -no-feature-CURSOR - 'class QDialog' has no member named 'setCursor'

    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).

  5. #5

    Default Re: -no-feature-CURSOR - 'class QDialog' has no member named 'setCursor'

    Excellent! That did the trick. Thank you so much!

Similar Threads

  1. Replies: 12
    Last Post: 21st June 2015, 16:04
  2. Replies: 4
    Last Post: 16th June 2015, 17:50
  3. Replies: 1
    Last Post: 8th March 2014, 20:03
  4. Class 'QWidge't has no member named 'setSize'
    By Omicron in forum Qt Programming
    Replies: 5
    Last Post: 3rd April 2011, 16:48
  5. Replies: 2
    Last Post: 29th June 2009, 06:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.