Results 1 to 2 of 2

Thread: Qt and exception support....

  1. #1
    Join Date
    Oct 2009
    Location
    Russia, South Ural, Chelyabinsk
    Posts
    42
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt and exception support....

    Hi!

    I'am build application for MacOS, Windows and Linux.

    In my code I use exceptions (c++ standart), but in Qt I not found exception anywhere, only error code and true|false returning.

    May be some OS not support exception? ... and why Qt framework don't use exceptions?

    Thanks.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt and exception support....

    Qt does uses exceptions (hence QT_NO_EXCEPTIONS definition), but not very many of them.

    Personally, I prefer to do without them unless I find it's necessary to do a cleanup if the function fails. I would hate to have to litter my code with "try...catch" in case a Qt function threw an exception. A return code is more friendlier, and you can then decide for yourself whether or not to turn it into an exception.

Similar Threads

  1. Rebuilding Qt 4.5.0
    By mpele in forum Installation and Deployment
    Replies: 9
    Last Post: 23rd May 2013, 16:05
  2. Problem building qt embedded for WinCE and VS2005
    By high_flyer in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 5th June 2009, 01:04
  3. Fail to deploy a static app in qt 4.5
    By HelloDan in forum Installation and Deployment
    Replies: 1
    Last Post: 1st June 2009, 05:16
  4. qssl
    By jsmith in forum Qt Programming
    Replies: 29
    Last Post: 7th April 2009, 22:21
  5. Cannot configure -platform win32-msvc2008, no nmake.exe
    By Jason Hamilton in forum Installation and Deployment
    Replies: 3
    Last Post: 1st September 2008, 10:05

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.