Vote count: 0 I am populating a QGraphicsScene with instances of a custom item class (inherting QGraphicsPathItem). At some point during runtime, I try to remove an item (plus its children) from the scene by calling: delete pItem; This automatically calls QGraphicsScene::removeItem(), however it also leads to a crash in the class QGraphicsSceneFindItemBspTreeVisitor during the next repaint. asked 24 secs agoPhilip Allgaier 1 Answer Vote count: 0 TL;DR: The solution is to ensure that QGraphicsItem::prepareGeometryChange() gets called before the item's removal from the scene. The problem is that during the item removal from the scene, the scene inteal index was not properly updated, resulting ...
ادامه مطلبVote count: -1 I have this simple code: let task = session.dataTaskWithRequest(request, completionHandler: {(data, response, error) in print(response) do { let JSON = try NSJSONSerialization.JSONObjectWithData(data!, options:.AllowFragments) // never printed print(JSON) guard let JSONDictionary :NSDictionary = (JSON as! NSDictionary) else { print("Not a Dictionary") retu } print("JSONDictionary! (JSONDictionary)") } catch let JSONError as NSError { print("(JSONError)") } }); // task.resume() Well, I can read the response but then I get (lldb) and the app crashes. The line print(JSON) is never printed. I really can't understand what's going on, any tip is appreciated. asked 3 mins agoIan Bell...
ادامه مطلب