qt_common_adapters.h 605 B

1234567891011121314151617181920212223
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #pragma once
  8. #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
  9. #include <QtGui/QInputDevice>
  10. #else // Qt >= 6.0.0
  11. #include <QtGui/QTouchDevice>
  12. #endif // Qt < 6.0.0
  13. namespace base {
  14. #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
  15. using TouchDevice = QInputDevice::DeviceType;
  16. #else // Qt >= 6.0.0
  17. using TouchDevice = QTouchDevice;
  18. #endif // Qt < 6.0.0
  19. } // namespace base