PyQt4 - remember widget positions
Is there any simple command which allows me to save position of all windows: QMainWindow, QDialogs and qdockwidgets with their sizes, dock state and positions ? Or do I need to store those values manually, how can I do it fast? -- http://mail.python.org/mailman/listinfo/python-list
Re: PyQt4 - remember widget positions
On Oct 22, 4:05 am, TerryP wrote: > On Oct 21, 9:04 pm, nusch wrote: > > > Is there any simple command which allows me to save position of all > > windows: QMainWindow, QDialogs and qdockwidgets with their sizes, > > dock state and positions ? Or do I need to store those values > > manually, how can I do it fast? > > Both fast and simple have relative meanings, there may be some common > persistence mumbo jumbo added to Qt since I last looked but, in > generally read this: > > http://doc.trolltech.com/4.5/geometry.html > > I don't know off the top of my head if PyQt's documentation has code > examples on it, but it should be fairly easy for you to comprehend how > to do it in Python. > . > -- > TerryP Yes, but I meant how to store all QApplication windows size and pos at once, I don't want to introduce lot of additional strings describing keys in QSettings. I migrated my app from PyKDE to pure PyQt4 and there was 1 command for whole app to remember those settings. -- http://mail.python.org/mailman/listinfo/python-list
Migrate From PyQt3 to PyQt4
I want to migrate from qt,pyqt,pykde 3 to 4 and remove all *.py files to work with newer version, also after remove pyqt3support. How can I do it in easy way ? I've read here http://www.mail-archive.com/p...@riverbankcomputing.com/msg15009.html something about deprecation warning but can't see such warning anywhere. My python modules also produce a lot of output so I can easily overlook such information. Is there a way to stop execution after every old qt3 class/method? I know I can remove all qt3, qt3support libs, but I don't want to make whole system unstable because of one project. -- http://mail.python.org/mailman/listinfo/python-list
PyQt QCompleter model
The following code: strings=["asdad", "baasd", "casd", "caxd"] completer = QCompleter(strings) model = completer.model() print model.rowCount() model.stringList().append("test") print model.rowCount() prints 4 before and after appending test to stringList. What should I do to let the model know about new data? I can save reference to model.stringList() append keyword and after pass this reference as an argument to setStringList then last model.rowCount() increases, but it is not efficient when operating with e.g 2 words in such list. Is there better way to do this? Or is there any other method with simply allow to add word to Qcompleter without using .stringList() > -- http://mail.python.org/mailman/listinfo/python-list
Re: PyQt QCompleter model
On Sep 17, 2:40 am, David Boddie wrote: > On Thursday 17 September 2009 01:14, nusch wrote: > > > The following code: > > > strings=["asdad", "baasd", "casd", "caxd"] > > completer = QCompleter(strings) > > model = completer.model() > > print model.rowCount() > > model.stringList().append("test") > > This may not work as you expect. Although it may actually modify the list, > the model won't know about the change. > > > print model.rowCount() > > > prints 4 before and after appending test to stringList. What should I > > do to let the model know about new data? I can save reference to > > model.stringList() append keyword and after pass this reference as an > > argument to setStringList then last model.rowCount() increases, but it > > is not efficient when operating with e.g 2 words in such list. > > Ideally, you would call setStringList(), but I can see why that isn't a > good solution for you. > > > Is there better way to do this? Or is there any other method with > > simply allow to add word to Qcompleter without using .stringList() > > > Use the model API to append new rows and set new data. Something like > this should get you started: > > rows = model.rowCount() > if model.insertRow(rows): > index = model.index(rows) > model.setData(index, QVariant("test")) > > David Thanks :) -- http://mail.python.org/mailman/listinfo/python-list
Re: Substitute for KConfig in Qt4
On Sep 19, 3:53 am, David Boddie wrote: > On Thursday 17 September 2009 13:04, nusch wrote: > > > I want to remove pyKDE dependencies from my app to make it pure PyQt. > > What will be the best substitute for KConfig? > > What exactly do you use KConfig for in your application? > > David e.g storing dock window positions, fields choosen in QComboBox etc. But I Dont want to use normal config files for it -- http://mail.python.org/mailman/listinfo/python-list
Re: Substitute for KConfig in Qt4
On Sep 22, 3:43 pm, David Boddie wrote: > On Sat Sep 19 12:18:40 CEST 2009, nusch wrote: > > > On Sep 19, 3:53 am, David Boddie wrote: > > > On Thursday 17 September 2009 13:04, nusch wrote: > > > > I want to remove pyKDE dependencies from my app to make it pure PyQt. > > > > What will be the best substitute for KConfig? > > > > What exactly do you use KConfig for in your application? > > > > David > > > e.g storing dock window positions, fields choosen in QComboBox etc. > > But I Dont want to use normal config files for it > > Then you would use QSettings. Although that may use configuration files > behind the scenes, they should at least be stored in a standard place. > > http://www.riverbankcomputing.com/static/Docs/PyQt4/html/qsettings.html > > David Thanks. That's what I'm looking for -- http://mail.python.org/mailman/listinfo/python-list