QGIS/python/PyQt/PyQt/QtPrintSupport.py.in
Nyall Dawson 601854a790 Patch back in flags removed in PyQt6
PyQt6 explicitly removes QFlag types from Qt c++ classes whereas
these were exposed in PyQt5. Patch them back in for compatibility.
2024-01-27 20:39:48 +10:00

30 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
"""
***************************************************************************
QtPrintSupport.py
---------------------
Date : November 2015
Copyright : (C) 2015 by Matthias Kuhn
Email : matthias at opengis dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Matthias Kuhn'
__date__ = 'November 2015'
__copyright__ = '(C) 2015, Matthias Kuhn'
from PyQt@QT_VERSION_MAJOR@.QtPrintSupport import *
if @QT_VERSION_MAJOR@ == 6:
# patch back in Qt flags removed in PyQt
QAbstractPrintDialog.PrintDialogOptions = lambda flags=0: QAbstractPrintDialog.PrintDialogOption(flags)