I´m using a QVector to save values of a file text. I want to control when I select a incorrect file and a “index out of range” happens. I am trying with a catch(…) but I don´t get attach the exception. is it possible attach this type of events of QObjects with try-ctach blocks?
Share
Qt doesn’t use exceptions, it just has asserts on out of range access. You will need to either switch to std::vector or implement your own wrapper around QVector which throws.