Results 1 to 4 of 4

Thread: how to use try... catch in qt4.6.3?

  1. #1
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    183
    Qt products
    Qt4
    Platforms
    Windows

    Default how to use try... catch in qt4.6.3?

    Hi ,every one.
    my program with qt 4.6.3+vs2008,and found that there is not try ... catch in Qt4.6.3.How to use try... catch in vs 2008 debug mode?thank you very much!

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,508
    Thanked 277 Times in 272 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to use try... catch in qt4.6.3?

    Qt is a library not a language. Use try-catch like in normal C++ program.

  3. #3
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    183
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to use try... catch in qt4.6.3?

    thank you ,I try it.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,527
    Thanks
    253
    Thanked 722 Times in 712 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: how to use try... catch in qt4.6.3?

    But be aware that exceptions will cause problems if they are thrown in a Qt event handler (like a slot). See this stackoverflow article. So, you should not be writing code that throws exceptions if you are writing it for use with Qt, unless isolate it to within code that does not use the Qt event loop.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. I don't catch exception in Qt
    By Pechkin in forum Newbie
    Replies: 1
    Last Post: 2nd May 2018, 14:18
  2. Not Able to put breakpoint inside catch() of try,catch block
    By vinothrajendran in forum Qt Programming
    Replies: 0
    Last Post: 15th July 2015, 08:22
  3. how to catch qMouseEvent
    By pakine in forum Newbie
    Replies: 0
    Last Post: 5th July 2010, 17:16
  4. Catch a Key, like designer
    By aekilic in forum Newbie
    Replies: 27
    Last Post: 7th May 2009, 10:01
  5. How to catch segfaults?
    By Daliphant in forum Newbie
    Replies: 4
    Last Post: 3rd July 2008, 14:17

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.