Skip to content

Commit

Permalink
Merge pull request #140 from abstractfactory/implement139
Browse files Browse the repository at this point in the history
Implement #139
  • Loading branch information
mottosso authored Sep 21, 2016
2 parents d13543a + 87d57aa commit 8f3ed0e
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 178 deletions.
16 changes: 13 additions & 3 deletions CAVEATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,21 @@ AttributeError: 'PySide.QtGui.QHeaderView' object has no attribute 'setSectionRe

##### Workaround

Use a conditional.
Use compatibility wrapper.

```python
# PySide2
>>> from Qt import QtWidgets, QtCompat
>>> app = QtWidgets.QApplication(sys.argv)
>>> view = QtWidgets.QTreeWidget()
>>> header = view.header()
>>> QtCompat.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed)
```

Or a conditional.

```python
# PyQt5
>>> from Qt import QtWidgets, __binding__
>>> app = QtWidgets.QApplication(sys.argv)
>>> view = QtWidgets.QTreeWidget()
Expand All @@ -266,5 +277,4 @@ Use a conditional.
... header.setResizeMode(QtWidgets.QHeaderView.Fixed)
... else:
... header.setSectionResizeMode(QtWidgets.QHeaderView.Fixed)
```

```
Loading

0 comments on commit 8f3ed0e

Please sign in to comment.