[PyQt] [QScintilla] - changing font to editor by settings dialog
Hi all, I would like to change font and fontsize (eventually API path too) in my editor by using a setting dialog. What I looking to do is on event click (accept) of settings dialog apply the changes at the editor. Any hint ? Also, is there any useful resource on how can I use refreshProperties, readSettings, writeSettings ? Thanks in advance ! -SL -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] [QScintilla] - changing font to editor by settings dialog
All stuff you asked for is used in the eric IDE. You may have a look at the code or simply use it for your purpose. Regards, Detlev On Thursday 11 October 2012, 14:33:48 Salvatore Larosa wrote: Hi all, I would like to change font and fontsize (eventually API path too) in my editor by using a setting dialog. What I looking to do is on event click (accept) of settings dialog apply the changes at the editor. Any hint ? Also, is there any useful resource on how can I use refreshProperties, readSettings, writeSettings ? Thanks in advance ! -SL -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode -- Detlev Offenbach det...@die-offenbachs.de___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] [QScintilla] - changing font to editor by settings dialog
Hi Detlev and thank you for your quick reply, 2012/10/11 Detlev Offenbach det...@die-offenbachs.de ** All stuff you asked for is used in the eric IDE. You may have a look at the code or simply use it for your purpose. I am working on development of a simple interactive python console [1] and I would like handle myself this settings by settings dialog base [2]. I am looking to ERIC code but I cannot find something help me ! Here [3] how I defined the settings for lexer ! How can I call pythonConsole/fontfamilytext key in readSettings and pass it to setDefaultFont method? and then How can I refresh properties for lexer so apply the changes ? simply self.lexer.refreshProperties() ?? Any advice is appreciate ! Regards, -SL [1] - http://lrssvt.ns0.it/img/console.png [2] - http://lrssvt.ns0.it/img/settings.png [3] - https://gist.github.com/3855242 Regards, Detlev On Thursday 11 October 2012, 14:33:48 Salvatore Larosa wrote: Hi all, I would like to change font and fontsize (eventually API path too) in my editor by using a setting dialog. What I looking to do is on event click (accept) of settings dialog apply the changes at the editor. Any hint ? Also, is there any useful resource on how can I use refreshProperties, readSettings, writeSettings ? Thanks in advance ! -SL -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode -- Detlev Offenbach det...@die-offenbachs.de -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QComboBox.findItem and tuples
Hi, as shows the following code, QComboBox.findItem works fine with lists but no with tuples. if __name__ == __main__: import sip sip.setapi('QVariant', 2) from PyQt4 import QtGui a = QtGui.QApplication([]) cb = QtGui.QComboBox() cb.addItem(Foo, [3,4]) cb.addItem(Bah, (2, 2)) print cb.findData([3,4]) print cb.findData((2,2)) Is it a bug or just a limitation of the implementation? Or something else? TIA -- Share what you know, learn what you don't. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] QComboBox.findItem and tuples
On Thu, 11 Oct 2012 22:21:09 +0200, Vicent Mas uve...@gmail.com wrote: Hi, as shows the following code, QComboBox.findItem works fine with lists but no with tuples. if __name__ == __main__: import sip sip.setapi('QVariant', 2) from PyQt4 import QtGui a = QtGui.QApplication([]) cb = QtGui.QComboBox() cb.addItem(Foo, [3,4]) cb.addItem(Bah, (2, 2)) print cb.findData([3,4]) print cb.findData((2,2)) Is it a bug or just a limitation of the implementation? Or something else? TIA It's a limitation of QVariant in that it doesn't provide an opportunity to inject a call to a Python comparison function when comparing custom types. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt