[PyKDE] First Python QT app queries

Dave S eric3 at pusspaws.net
Wed Jul 19 07:44:30 BST 2006


On Wednesday 19 July 2006 00:03, Andreas Pakulat wrote:
> On 18.07.06 20:39:17, Dave S wrote:
> > (1) When I execute my dialogue script I have to
> > 'python dlg_livedata.py',  If I ...
> > './dlg_livedata.py'
> >  as I normally do I get a wierd X cursor. What is happening, I thought
> > with a '#!/bin...python' both statements were the same ?
>
> I guess you start it from a command line? Why not use eric's built in
> support for starting your script?
>
> Anyway executing the script via ./<script> should work fine if the
> script is executable and the proper python is used. But the
> script you included below doesn't contain any shebang.
>
> > (2) When I start my dialogue script I get warnings from BASH ...
> >
> > ubuntu at ubuntu:~/python_develop/unison/DDC/QT$ python dlg_livedata.py
> > X Error: BadDevice, invalid or uninitialized input device 168
> >   Major opcode:  145
> >   Minor opcode:  3
> >   Resource id:  0x0
> > Failed to open device
> > X Error: BadDevice, invalid or uninitialized input device 168
> >   Major opcode:  145
> >   Minor opcode:  3
> >   Resource id:  0x0
> > Failed to open device
> >
> > Am I doing something wrong or is this normal ?
>
> This doesn't look normal and it doesn't happen here with the example
> from below. So there musst be some error in your application.
>
> > (3) I would like my boxes to stretch if I full screen the window. They
> > stay the same size - I have looked in qt designer but max size is already
> > set to 32767 - what do I have to do to allow stretching ?
>
> What you want is called a Layout, see the Qt documentation for more
> information.
>
> > (4) When I made my QlistBox I deleted all items. In qt designer preview
> > it looks perfect. When I write to the list box ie ...
> > 'win.listBox2.insertItem(mapdata)'
> > I get a this line below the top line. How do I delete it ?
>
> I don't understand what your goal is? Do you want to replace an existing
> item with a new text? Then use changeText with a proper index. If you
> want to insert a new item at a specific position give an index number to
> the insertItem call. If you want something completely different, I think
> you should show us some code.
>
> Andreas

Hi,

I will try & send the code & test script tonight - work permitting :)

Dave




More information about the PyQt mailing list