[PyKDE] QScintilla Scrollbars

Phil Thompson phil at riverbankcomputing.co.uk
Wed Jan 19 09:06:17 GMT 2005


> On Sat, 15 Jan 2005 09:47:56 you wrote:
>>Can you post some code that demonstrates the problem?
>
> Here is an app that demos the problem:
>
> import sys
> from qt import *
> from qtext import QextScintilla
> class Editor(QDialog):
>     def __init__(self):
>         QDialog.__init__(self)
>         self.QS = QextScintilla(self)
>         self.QS.setGeometry(8,8,500,300)
>         b = QPushButton('Toggle Scrollbar',self)
>         b.setGeometry(190,320,120,22)
>         self.connect(b,SIGNAL('clicked()'),self.fn)
>
>     def fn(self):
>
> self.QS.SendScintilla(self.QS.SCI_SETHSCROLLBAR,
>             not
> self.QS.SendScintilla(self.QS.SCI_GETHSCROLLBAR))
> if __name__ == "__main__":
>     a = QApplication(sys.argv)
>
> a.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()'))
>     w = Editor(); a.setMainWidget(w); w.show()
>     a.exec_loop()

This will be fixed in the next QScintilla snapshot - probably next weekend.

Thanks for the test case.

Phil




More information about the PyQt mailing list