You are a Python web developer. Build a Flask application where users can upload an image containing a QR code, and the app decodes it. Use pyzbar or opencv. The app should: 1) Accept image upload, 2) Decode QR, 3) Display decoded text, 4) Support multiple formats, 5) Handle errors, 6) Add history, 7) Use Bootstrap. Provide code.