Results 1 to 3 of 3

Thread: What is the meaning of 'NO' in names like QT_NO_ITEMVIEWS?

  1. #1
    Join Date
    Jun 2014
    Posts
    98
    Thanks
    43
    Thanked 4 Times in 4 Posts
    Platforms
    Windows

    Default What is the meaning of 'NO' in names like QT_NO_ITEMVIEWS?

    I'm working through some Qt code, and there are a bunch of places you find include guards like:
    Qt Code:
    1. #ifndef QT_NO_ITEMVIEWS
    To copy to clipboard, switch view to plain text mode 
    I'm curious what the 'NO' means here? At first I thought it meant 'no', like 'no item views allowed'. Obviously that is silly. This nomenclature is used for every feature. List of such features is found here:
    http://realxtend-naali-deps.googleco...re/qfeatures.h
    http://code.metager.de/source/xref/l.../qfeatures.txt
    They are defined here:
    https://github.com/openwebos/qt/blob...features_dot_h

    I've searched some, and cannot find what this NOmenclature means. Likely an acronym, but for what?

  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: What is the meaning of 'NO' in names like QT_NO_ITEMVIEWS?

    NO means no.

    By default the vast majority of optional features in Qt are turned on by default. When building Qt you can choose to turn these off and doing so puts a define like QT_NO_ITEMVIEWS into the Qt headers (qfeatures.h) of the built libraries.

    Application code can use these defines to avoid the features that are disabled but not essential to the program. Alternatively, fail to build if built with a library that has an essential feature compiled out

    Qt Code:
    1. #ifndef QT_NO_IMAGEFORMAT_BMP
    2. // do stuff with BMP format files
    3. #endif
    4.  
    5. #ifdef QT_NO_IMAGEFORMAT_PNG
    6. #error "Cannot compile without PNG support in the Qt library"
    7. #endif
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to ChrisW67 for this useful post:

    neuronet (6th December 2015)

  4. #3
    Join Date
    Jun 2014
    Posts
    98
    Thanks
    43
    Thanked 4 Times in 4 Posts
    Platforms
    Windows

    Default Re: What is the meaning of 'NO' in names like QT_NO_ITEMVIEWS?

    OK so these are basically acting like flags. Very helpful to know!

Similar Threads

  1. Meaning of ':' in Qt directories
    By mchome in forum Newbie
    Replies: 1
    Last Post: 11th August 2012, 22:43
  2. LGPL meaning
    By StackOverflow in forum General Discussion
    Replies: 5
    Last Post: 16th November 2010, 00:00
  3. Meaning
    By addu in forum Qt Programming
    Replies: 11
    Last Post: 21st May 2009, 13:06
  4. QGraphicsItem meaning of pos(), scenePos()
    By nicolas1 in forum Qt Programming
    Replies: 11
    Last Post: 9th October 2008, 09:59
  5. some warning meaning
    By MarkoSan in forum General Programming
    Replies: 2
    Last Post: 28th May 2008, 14:40

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.