Re: Got error with QSplitterHandle

Maurizio Berti <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAPn+-XTS13JtL0gU+5rs_gz=3TiYLtyirMP+2HJ_TRM4kMBkgA@mail.gmail.com>
Il giorno sab 13 lug 2019 alle ore 10:07 Gottfried Müller <
[email protected]> ha scritto:

> TypeError: QSplitterHandle(Qt.Orientation, QSplitter): argument 1 has
> unexpected type 'MySplitter'
>
[...]

> class MySplitterHandle(QSplitterHandle):
>
>      def __init__(self, orientation, parent=None):
>          super().__init__(parent)
>          self.orientation(orientation)
>

The first and mandatory argument of QSplitterHandle init is a
QtCore.Qt.Orientation, not the parent.
See https://doc.qt.io/qt-5/qsplitterhandle.html#QSplitterHandle
Just add the orientation before the parent in the super.

Maurizio

-- 
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net
_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.