Re: [PyKDE] XML support

2003-11-24 Thread Derek Fountain
> Is anyone doing anything major with the qtxml package? Is XML support in > PyQt experimental? Perhaps I would be better to rely on another package for > now...I also see the none of the SAX stuff is wrapped or exposed. If qtxml > was good enough, it'd be one less package I'd need to add to my pro

Re: [PyKDE] Embedding icon inside code

2003-11-10 Thread Derek Fountain
> Qt Designer + pyuic can also generate a python sequence for use with > QPixmap. Can you give me a clue how? I'm happy to go with Roland's suggestion, but if there's a better way... -- > eatapple core dump ___ PyKDE mailing list[EMAIL PROTECTED]

[PyKDE] Non disappearing label

2003-11-09 Thread Derek Fountain
If I have a frame, inside which I put a label arranged via a vertical layout box, then call this code: contentsFrameLayout = self.contentsFrame.layout() contentsFrameLayout.remove( self.labelWidget ) del self.labelWidget wouldn't I expect the label to disappear off screen

[PyKDE] Embedding icon inside code

2003-11-09 Thread Derek Fountain
I have some code which requires an icon. The icon is currently in a PNG file. I want to have this code as reusable as possible, ideally in a position where I can redistribute just one file. So I'd like a way of embedding the icon pixmap inside the class. Is that possible, and if so, how do I do

Re: [PyKDE] QDockArea layouts

2003-11-05 Thread Derek Fountain
> They aren't, but they are easy to add if you rebuild PyQt. (They'll be in > the next snapshot.) > > Look in qtextstream.sip and find the equivalent operators for QMainWindow. > Copy them, replacing QMainWindow with QDockArea. Um, probably not hard, but still a bit out of my league at this stage.

[PyKDE] QDockArea layouts

2003-11-05 Thread Derek Fountain
The QDockArea documentation describes these methods: QTextStream & operator<< ( QTextStream & ts, const QDockArea & dockArea ) QTextStream & operator>> ( QTextStream & ts, QDockArea & dockArea ) I'd like to be able to save my layout (to a QSettings file) and restore it when the application resta

Re: [PyKDE] Does pyuic name spacers correctly?

2003-10-28 Thread Derek Fountain
On Tuesday 28 October 2003 15:07, Derek Fountain wrote: > Subject says it all. I have a spacer named closeUpSpacer in designer (and > the .ui file). The Python code pyuic generates calls it "spacer_5". I need > to change the behaviour of that spacer, so having it called some

[PyKDE] Does pyuic name spacers correctly?

2003-10-28 Thread Derek Fountain
Subject says it all. I have a spacer named closeUpSpacer in designer (and the .ui file). The Python code pyuic generates calls it "spacer_5". I need to change the behaviour of that spacer, so having it called something sensible is rather useful to me. -- > eatapple core dump _

[PyKDE] Sorting a qlistview

2003-10-27 Thread Derek Fountain
I have a qlistview with 2 columns and a set number of rows. I've filled in the row names into column 0 in designer; my code now just fills in the values in column 1 when it gets the information. The problem is the qlistview is defaulting to having sorting on column 0. The code pyuic generates p

Re: [PyKDE] Resizing a window with an image in it

2003-10-27 Thread Derek Fountain
On Monday 27 October 2003 16:28, Aurélien Gâteau wrote: > Le Lundi 27 Octobre 2003 09:13, Derek Fountain a écrit : > > I want the user to be able to push the window smaller, then have the > > image rescaled smaller. What do I need to enable/disable to make this > > happen?

[PyKDE] Resizing a window with an image in it

2003-10-27 Thread Derek Fountain
I tried this on the qt-interest list, but didn't get any replies. Perhaps someone here will be able to help me? I have a window which contain a QLabel, which I've set to hold an image. When the user makes the window bigger, I fetch the size of the QLabel and scale the image to be that big. This

Re: [PyKDE] Segv debugging

2003-10-15 Thread Derek Fountain
On Thursday 16 October 2003 11:47, Phil Thompson wrote: > # The SIP v4 module is called sip. > import libsip as sip > > sip.settracemask(0xff) > > ...you can change the mask at any time. See the SIP_TRACE_* values in sip.h > to see the detail of which trace messages correspond to which bit of the >

[PyKDE] Segv debugging

2003-10-15 Thread Derek Fountain
When getting a segv from a PyQt script, is there a way of getting and using a core dump such that it might provide a clue as to what I've done wrong? What steps do developers take when faced with a segv? -- > eatapple core dump ___ PyKDE mailing list

Re: [PyKDE] Designer style work area

2003-09-30 Thread Derek Fountain
On Tuesday 30 September 2003 17:50, Richard Jones wrote: > On Tue, 30 Sep 2003 07:10 pm, Derek Fountain wrote: > > Has anyone ever written an application in PyQt with an interface like the > > one used by QTdesigner? That is, with various "dialogs" which can be > >

[PyKDE] Designer style work area

2003-09-30 Thread Derek Fountain
Has anyone ever written an application in PyQt with an interface like the one used by QTdesigner? That is, with various "dialogs" which can be dragged around, docked, resized, hidden and shown, etc., all around a central work area. I'd like to write an app with that sort of interface. Can anyon

Re: [PyKDE] None as emit argument

2003-09-27 Thread Derek Fountain
On Sunday 28 September 2003 10:04, Derek Fountain wrote: > which seems self explanatory, although a bit odd. Is it not possible to > pass None as a parameter through the signal emitting system, or have I done > something wrong? Ignore me. I did something wrong. :o} -- > eatapp

[PyKDE] None as emit argument

2003-09-27 Thread Derek Fountain
I have this line of code: self.emit( PYSIGNAL("signalNewViewerImage"), (QPixmap(filename),) ) It's possible for the filename, and hence the pixmap, to be None. The slot handles this eventuality. However, when I run the code under these circumstances, I get: File "./view/PublishImageView.py",

[PyKDE] SegV

2003-09-24 Thread Derek Fountain
I'm running a self compiled PyQT-GPL-3.8 against Python-2.2.1 and Qt-3.1.1 on a SuSE-8.1 box. I'm getting a SegV. The code is this: --- from qt import * class Model(QObject): def __init__( self, *args ): apply( QObject.__init__, (self,) + args ) self.currentImageList = []

Re: [PyKDE] List confusion

2003-09-24 Thread Derek Fountain
On Wednesday 24 September 2003 15:46, Phil Thompson wrote: > Should emit() take a variable number of arguments rather than a single > tuple? Maybe, but it's too late to change now. OK, that makes sense. :o) -- > eatapple core dump ___ PyKDE mailing li

[PyKDE] List confusion

2003-09-24 Thread Derek Fountain
This might be a general Python newbie question. But it's confusing me in a PyQt context. :o) I have a slot in a class which receives a list of images. It adds that list to it's existing list, then sends off a signal saying the existing list has changed: currentImageList = [] def slotIn

Re: [PyKDE] QListBox selectedItem()

2003-09-02 Thread Derek Fountain
On Tuesday 02 September 2003 09:17, Derek Fountain wrote: > On Tuesday 02 September 2003 00:19, Greg Fortune wrote: > > The code works fine over here. > > Ah, OK. Definitely an outdated version issue then. Looks like I'll have to > either figure out how to update PyQt,

[PyKDE] Passing the equivalent of NULL

2003-09-02 Thread Derek Fountain
I'm told on the Qt list that: myLabel->setPixmap(NULL); sets a label's pixmap to nothing without giving a warning message. How do I do that from PyQt? I tried: pixmapLabel.setPixmap( QPixmap() ) which does give an empty pixmap, byt also prints a warning. Using "None" gave a runtime error, as

Re: [PyKDE] QListBox selectedItem()

2003-09-02 Thread Derek Fountain
On Monday 01 September 2003 23:19, Denis Saussus wrote: > Sorry, I rushed and made a silly suggestion. Of course you are correct, > selectedItem() does not take a parameter. On the other hand, it's odd that > your script does not work. It works just fine for me on Linux running > Qt-x11-3.2 and

Re: [PyKDE] QListBox selectedItem()

2003-09-02 Thread Derek Fountain
On Tuesday 02 September 2003 00:19, Greg Fortune wrote: > The code works fine over here. Ah, OK. Definitely an outdated version issue then. Looks like I'll have to either figure out how to update PyQt, or try SuSE-8.2 instead. > If you want to know what index is selected > rather than what item

Re: [PyKDE] QListBox selectedItem()

2003-09-01 Thread Derek Fountain
On Monday 01 September 2003 16:05, Denis Saussus wrote: > I believe that this should solve your problem. Replace: >print list.selectedItem() > with >print list.selectedItem(1) (or 0 or whatever item you wish to see if it > is selected) > i.e. The problem is that Python cannot guess which i

[PyKDE] QListBox selectedItem()

2003-09-01 Thread Derek Fountain
Is the QListBox selectedItem() method implemented? At the risk of looking a complete newbie, which I am, why does this: #!/usr/bin/python import sys from qt import * app=QApplication(sys.argv) list=QListBox() list.insertItem("Item 1") list.insertItem("Item 2") list.insertItem("Item 3") list.s

[PyKDE] Listbox item value

2003-05-28 Thread Derek Fountain
Given this bit of (total newbie) code: --- #!/usr/bin/python import sys from qt import * app=QApplication(sys.argv) list=QListBox() list.insertItem("Item 1") list.setCurrentItem(0) list.clearSelection() print "Currently selected: " + str(list.currentItem()) list.setCurrentItem(-1) print "Curr