Qt.py: Missing QtPrintSupport

Hi,

I am unable to find a reason for why this would be missing and am hoping somebody can enlighten me.

import Qt
print Qt.__binding__
print Qt.__binding_version__
from Qt import QtPrintSupport

PySide2
2.0.0~alpha0
# Error: ImportError: file <maya console> line 5: No module named QtPrintSupport # 

And in the same session:

import PySide2
from PySide2 import QtPrintSupport
QtPrintSupport
# Result: <module 'PySide2.QtPrintSupport' from '/[removed]/autodesk/maya/2018/maya/lib/python2.7/site-packages/PySide2/QtPrintSupport.so'> # 

I see the same result in PyQt4, where the member also exists.

Best, Alex

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (1 by maintainers)

Most upvoted comments

I think QtPrintSupport is similar to how QtGui was separated into QtGui and QtWidgets. How are you handling that?

All of these are tested on windows. Houdini 16.5.323, Maya 2017, 3dsMax 2018:

>>> from PySide2 import QtPrintSupport
>>> dir(QtPrintSupport)
['QAbstractPrintDialog', 'QPageSetupDialog', 'QPrintDialog', 'QPrintEngine', 'QPrintPreviewDialog', 'QPrintPreviewWidget', 'QPrinter', 'QPrinterInfo', '__doc__', '__file__', '__name__', '__package__']

Houdini 16.0.557, Maya 2016.0:

>>> from PySide import QtGui
>>> for name in ['QAbstractPrintDialog', 'QPageSetupDialog', 'QPrintDialog', 'QPrintEngine', 'QPrintPreviewDialog', 'QPrintPreviewWidget', 'QPrinter', 'QPrinterInfo']: print getattr(QtGui, name)
<type 'PySide.QtGui.QAbstractPrintDialog'>
<type 'PySide.QtGui.QPageSetupDialog'>
<type 'PySide.QtGui.QPrintDialog'>
<type 'PySide.QtGui.QPrintEngine'>
<type 'PySide.QtGui.QPrintPreviewDialog'>
<type 'PySide.QtGui.QPrintPreviewWidget'>
<type 'PySide.QtGui.QPrinter'>
<type 'PySide.QtGui.QPrinterInfo'>

The Qt.py unit tests pass when adding QtPrintSupport to _common_members and updating _misplaced_members for Qt4 support. tests.test_membership()

Nuke 10.5v6 and Houdini 15:

from PySide.QtGui import QPrinter
# Result: QPrinter
<type 'PySide.QtGui.QPrinter'>