mainwindow.cpp 640 B

1234567891011121314151617181920212223242526272829303132
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. #include <QDebug>
  4. MainWindow::MainWindow(QWidget *parent)
  5. : QMainWindow(parent)
  6. , ui(new Ui::MainWindow)
  7. {
  8. ui->setupUi(this);
  9. try
  10. {
  11. HImage img;
  12. img.ReadImage("1.jpg");
  13. qDebug() << "ReadImage ok";
  14. }
  15. catch (HException& exception)
  16. {
  17. char m_szMsg[2048] = "";
  18. snprintf(m_szMsg, sizeof(m_szMsg), "Error #%u in %s: %s", exception.ErrorCode(),
  19. exception.ProcName().TextA(),
  20. exception.ErrorMessage().TextA());
  21. qWarning() << m_szMsg;
  22. }
  23. }
  24. MainWindow::~MainWindow()
  25. {
  26. delete ui;
  27. }