Re: [PyQt] QTreeWidget and fixed column widths on window resize

2008-07-31 Thread Tyler Distad
> Not really. From the docs: > > > > stretchLastSection : bool > This property holds whether the last visible section in the header takes up > all the available space. > The default value is false. > Note: The horizontal headers provided by QTreeView are configured with this > prop

Re: [PyQt] QTreeWidget and fixed column widths on window resize

2008-07-31 Thread Roberto Alsina
On Thursday 31 July 2008 18:24:10 Andreas Pakulat wrote: > On 31.07.08 21:37:04, Chris M wrote: > > Not sure if there is a 'cleaner' solution but overriding the event is > > fairly simple, for example; > > > > class MyTreeWidget(QTreeWidget): > > def __init__(self, parent = None): > > s

Re: [PyQt] QTreeWidget and fixed column widths on window resize

2008-07-31 Thread Andreas Pakulat
On 31.07.08 21:37:04, Chris M wrote: > Not sure if there is a 'cleaner' solution but overriding the event is > fairly simple, for example; > > class MyTreeWidget(QTreeWidget): > def __init__(self, parent = None): > super(MyTreeWidget, self).__init__(parent) > > def resizeEvent(sel

[PyQt] Re: Destructor being called on a subthread.

2008-07-31 Thread Kevin Watters
> You could look at the call to PyObject_GC_UnTrack() in > sipWrapper_dealloc(). I don't think it's the same problem, but there may be > similarities. As far as I can tell, PyObject_GC_UnTrack just says that the GC shouldn't call the traverse functions while you're destructing the object--but what

Re: [PyQt] QTreeWidget and fixed column widths on window resize

2008-07-31 Thread Chris M
Not sure if there is a 'cleaner' solution but overriding the event is fairly simple, for example; class MyTreeWidget(QTreeWidget): def __init__(self, parent = None): super(MyTreeWidget, self).__init__(parent) def resizeEvent(self, event): width = event.size().width()

[PyQt] QTreeWidget and fixed column widths on window resize

2008-07-31 Thread Tyler Distad
I am attempting to create a QTreeWidget containing two columns. The rightmost column is to remain at a fixed width, no matter how large the window itself grows. The leftmost column is to grow in the normal manner. (Picture the playlist columns in your favorite music player, and you probably have ex

Re: [PyQt] Problem using promoted widgets with PyQt 4.4.2

2008-07-31 Thread Jan Ekholm
On Thursday 31 July 2008 10:15:34 Jan Ekholm wrote: > Seems that QObjectCreator.addCustomWidget > in /usr/lib/python2.5/site-packages/PyQt4/uic/objcreator.py manages to find > a class named KeywordTree in PyKDE4.kdeui. When that method is entered the > data is all fine and when done it's wrong, ie

Re: [PyQt] QTableWidget Data Paste Time

2008-07-31 Thread B Clowers
Thanks for the information.  I was hoping to avoid the model-view as it is pretty daunting task especially for someone new to programming.  I don't suppose that anyone out there may be willing to share and example of how to paste data from the clipboard into a QTableView? Cheers, Brian ---

Re: [PyQt] Destructor being called on a subthread.

2008-07-31 Thread Phil Thompson
On Thu, 31 Jul 2008 14:42:17 + (UTC), Kevin Watters <[EMAIL PROTECTED]> wrote: > I've got a sporadic crash in my app (not PyQT) and I think I have it > narrowed down. > > 1) Main thread creates a Flub object. > 2) Main thread releases all references to the Flub object, but there's a > cycle,

[PyQt] Destructor being called on a subthread.

2008-07-31 Thread Kevin Watters
I've got a sporadic crash in my app (not PyQT) and I think I have it narrowed down. 1) Main thread creates a Flub object. 2) Main thread releases all references to the Flub object, but there's a cycle, so the object isn't collected immediately. 3) Worker thread does some unrelated work, during wh

Re: [PyQt] Saving PyObjects QSettings

2008-07-31 Thread Paul Giannaros
On Thu, Jul 31, 2008 at 3:11 PM, Paul Giannaros <[EMAIL PROTECTED]> wrote: > You do not need two config files this way. For example: > > o = pickle.dumps(myDevices) > settings.setValue('test', QVariant(o)) > print pickle.loads(str(settings.value(o).toString())) > Sorry, that last line should have

Re: [PyQt] Saving PyObjects QSettings

2008-07-31 Thread Paul Giannaros
You do not need two config files this way. For example: o = pickle.dumps(myDevices) settings.setValue('test', QVariant(o)) print pickle.loads(str(settings.value(o).toString())) On Thu, Jul 31, 2008 at 2:57 PM, Lukas <[EMAIL PROTECTED]> wrote: > Hello, > yes I know, but the disadvantage is that I

Re: [PyQt] Saving PyObjects QSettings

2008-07-31 Thread Lukas
Hello, yes I know, but the disadvantage is that I need two config files, so this is just me last resort Can I convert a list() to/from a QList() and save then this? Are QLists available in PyQt? On Thursday 31 July 2008 15:47:10 Paul Giannaros wrote: > You could just use the pickle module and sa

[PyQt] Saving PyObjects QSettings

2008-07-31 Thread Lukas
Hello, I wanted to save a PyObject in my QSettings: >>> from PyQt4.QtGui import * >>> app = QApplication([]) >>> settings = QSettings() >>> myDevices = list() >>> device = dict() >>> device["name"] = "just some testing" >>> device["addr"] = "00:22:33:5A:52" >>> myDevices.append(device) >>> QVar

[PyQt] Language of StandardButtons

2008-07-31 Thread Lukas
Hello, I have a question about the language of the standard Buttons in my dialogs. If I create a new button in Qt/C++ the language is German, but I don't get this behavior in Python with PyQt 4.4.2 My language is set correctly and it doesn't change anything if I try to set the language with ".s

Re: [PyQt] QTableWidget Data Paste Time

2008-07-31 Thread David Douard
On Wed, Jul 30, 2008 at 02:22:38PM -0700, Glenn Linderman wrote: > On approximately 7/30/2008 2:10 PM, came the following characters from > the keyboard of B Clowers: >> Greetings, >> >> I'm interested in incorporating a QTableWidget into one of my >> applications and would like to give it the

Re: [PyQt] PyKDE4: installing pykdedocs fails

2008-07-31 Thread Benno Dielmann
On Wednesday 30 July 2008 23:50:21 Simon Edwards wrote: | Hi, | | Benno Dielmann wrote: | > Hi, | > since the Kubuntu PyKDE4 packages don't contain the pykdedocs viewer, I | > tried to install it from the sources (PyKDE4-4.0.2-1.tar.bz2). | > Unfortunately, it fails: | | Install the python-qt4-dev

Re: [PyQt] Problem using promoted widgets with PyQt 4.4.2

2008-07-31 Thread Jan Ekholm
On Thursday 31 July 2008 09:53:24 Jan Ekholm wrote: > On Wednesday 30 July 2008 14:25:37 Jan Ekholm wrote: > > On Wednesday 30 July 2008 13:47:55 Jan Ekholm wrote: > > > > > > > > I cut the window down to a minimal example that for me does not work. The > > files are all attached and the code is a