Results 1 to 6 of 6

Thread: How to turn on optimization in qt??

  1. #1
    Join Date
    Aug 2012
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default How to turn on optimization in qt??

    Hi, I want to turn on the compiler's optimization. How can I do it?
    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to turn on optimization in qt??

    When building your project? When building Qt? What optimizations you are talking about?...

  3. #3
    Join Date
    Aug 2012
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to turn on optimization in qt??

    I mean when I need to release my project.

  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: How to turn on optimization in qt??

    Build it in release mode and the check the compiler commands... at least for my GCC toolchain the -O2 flag is already specified. If you really need/want to add to/change that you can use the QMAKE_CXXFLAGS_RELEASE qmake variable.

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

    tonylin0826 (7th September 2012)

  6. #5
    Join Date
    Aug 2012
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to turn on optimization in qt??

    That is what I am asking for. Thanks a lot. )

  7. #6
    Join Date
    Sep 2009
    Location
    Ukraine
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to turn on optimization in qt??

    Even you can use mingw32-make -j{COUNT_CORE}

Similar Threads

  1. g++ optimization
    By Krish_ng in forum Qt Programming
    Replies: 6
    Last Post: 31st August 2012, 09:01
  2. Nonlnear optimization in Qt
    By Tottish in forum Qt Programming
    Replies: 5
    Last Post: 31st March 2010, 18:42
  3. QT optimization
    By shiranraviv in forum Qt Programming
    Replies: 3
    Last Post: 9th February 2010, 18:57
  4. QTextEdit optimization
    By kib2 in forum Qt Programming
    Replies: 12
    Last Post: 6th November 2007, 22:28
  5. Qt g++ optimization
    By Krish_ng in forum Qt Programming
    Replies: 8
    Last Post: 2nd August 2007, 08:20

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.