IMO, the problem isn't in Q_OBJECT (as long as AutochargeData does not use "Qt extras" - it is not an UI object, it declares no properties, slots or signals, etc.) The setOrderID() method is innocent. IMO, the problem is somewhere in the database. For starters, I recommend splitting the setOrderID() statement and seeing whether you pass and what values will the debugger show. Therefore:
Qt Code:
  1. QVariant val = query.value("increment_id"); // does it pass?
  2. QString str = val.toString(); // does it pass? What is in str?
  3.  
  4. setOrderID(str); // does it pass? What happens?
To copy to clipboard, switch view to plain text mode 
Pleas, post your findings.