Results 1 to 2 of 2

Thread: How to find debug or release mode using code?

  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default How to find debug or release mode using code?

    I would like to change the code in release mode. How to find the release mode in code and then changing the code accordingly?

  2. #2
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Thanks
    18
    Thanked 68 Times in 66 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to find debug or release mode using code?

    set a preprocessor directive "DEBUG" for debug-mode and "NDEBUG" for release code. in your code, you can do

    Qt Code:
    1. #ifdef DEBUG
    2. // debug code
    3. #endif
    To copy to clipboard, switch view to plain text mode 

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

    Gokulnathvc (14th December 2011)

Similar Threads

  1. Replies: 4
    Last Post: 27th May 2010, 15:18
  2. Debug or Release mode in MAC
    By ssaa in forum Installation and Deployment
    Replies: 6
    Last Post: 9th March 2010, 05:15
  3. Replies: 1
    Last Post: 2nd November 2009, 12:02
  4. Replies: 9
    Last Post: 15th April 2009, 06:23
  5. Replies: 8
    Last Post: 10th October 2007, 18:20

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.