[PyQt] Re: Crash with shortcircuit signals

2007-07-17 Thread Giovanni Bajo

On 7/16/2007 2:36 PM, Phil Thompson wrote:


This will be fixed in tonight's PyQt snapshot.

The proxy created to handle the signal was being incorrectly reused by a new 
QObject created at the same address as the one the proxy was created for. 
Because there is no event processing going on, the proxy was not getting 
deleted - because it was waiting for a deleteLater() to be acted on.


I now get other crashes: from the debug, it seems like an instance of 
PyQtProxy which is already deleted is still part of the global list 
(uniproxies). Using debug builds of MS CRT, C++ instances which are 
deleted are filled with 0xFEFEFEFE, so I'm pretty sure of this symptom.


I had a look at your fix, and you moved the code to remove the PyQtProxy 
instance from the global list to the new disable() slot. Thus, if an 
instance of PyQtProxy is deleted directly without going through the 
slot, it will still be presente in the global list.


I copied the list removal code back into the destructor (keeping a duped 
copy in the disable() slot), and it seems to work.


Do you agree on this fix? Testcases are really hard and tiresome to 
extract so I'd rather avoid it if it's not really really necessary...

--
Giovanni Bajo

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Re: Crash with shortcircuit signals

2007-07-17 Thread Phil Thompson
On Tuesday 17 July 2007 2:34 pm, Giovanni Bajo wrote:
 On 7/16/2007 2:36 PM, Phil Thompson wrote:
  This will be fixed in tonight's PyQt snapshot.
 
  The proxy created to handle the signal was being incorrectly reused by a
  new QObject created at the same address as the one the proxy was created
  for. Because there is no event processing going on, the proxy was not
  getting deleted - because it was waiting for a deleteLater() to be acted
  on.

 I now get other crashes: from the debug, it seems like an instance of
 PyQtProxy which is already deleted is still part of the global list
 (uniproxies). Using debug builds of MS CRT, C++ instances which are
 deleted are filled with 0xFEFEFEFE, so I'm pretty sure of this symptom.

 I had a look at your fix, and you moved the code to remove the PyQtProxy
 instance from the global list to the new disable() slot. Thus, if an
 instance of PyQtProxy is deleted directly without going through the
 slot, it will still be presente in the global list.

Understood.

 I copied the list removal code back into the destructor (keeping a duped
 copy in the disable() slot), and it seems to work.

 Do you agree on this fix? Testcases are really hard and tiresome to
 extract so I'd rather avoid it if it's not really really necessary...

I can only see one place that a PyQtProxy is explicitly deleted. Can you try 
changing the delete up in sipQtDestroyUniversalSlot() to up-disable() 
instead of your fix.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] no printer in QDialogPrinter

2007-07-17 Thread Olivier Fournier

Hi,

debian etch + cups + python2.4 + Qt 4.3.0 + sip, pyqt last snapshot

the list off printer is empty when I call QDialogPrinter.
I don't find why
Could you help me?

best regards

Olivier Fournier
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Newbie questions: Tray system and other stuff...

2007-07-17 Thread Gustavo A. Díaz

HI David and all!!

I am trying to embed a xterm console inside my application, but with no
success.
I made some test embedding (example in another script) mplayer for testing
only and works.

Now when i want to embed xterm console does not work.

Here what i did:

I have a developing style which in a main script (MainApp.py), i plug all
together the Ui classes (generated with pyuic4 from .ui designer files/GUIs)
and then in others script, i write every module/code function of my app:

Xterm Embedding:

The core fuction of embedding xterm is here:
http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-server/core/console.py


Then i call it from the MainApp here:
http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-server/MainApp.py(in
line 273) which i insert it inside a frame of a Widget (And thet
Widget goes inside a stackedWidget).

If anyone could guide me here, will be lot of help.

Thanks.

--
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Need Help Wrapping WebKit

2007-07-17 Thread David Boddie
On Mon, 16 Jul 2007 20:50:26 -0400, Rob Knapp wrote:

  On Sat, 14 Jul 2007 07:15:29 -0400, Rob Knapp wrote:

  I found it easier to look at an existing project. Maybe it's time for
  some more documentation about this.

 Well, I dug for several hours a while in the PyQT code before posting to
 the list, but wasn't able to find the magic key.  I will keep trying.

 If I can get this working, I'd be happy to submit an updated tutorial with
  whatever information I gather.

Sounds good. I'll hold you to your promise. ;-)

  Does WebKit come with test and examples that you can use to check that
  it actually works as expected?

 Yes, building webkit builds a program called QtLauncher that lets you test
 and make sure everything is working, and I have verified that it was
 functional before posting.

OK. Maybe I should take a look at that.

  If you put your code somewhere, the people on this list who are both
  interested in WebKit and SIP experts can take a look at it.

 The code was attached to my original posting, a breach of netiquette, I
 know. However, I figured since the tarball was smaller than some posts
 (1.8K) to the list, it wouldn't raise too many hackles.

Ah, I see it now. I read your message via the list archive, so I didn't
see it.

 Of course, if people would rather download it from a website, I can easily
 post it somewhere as well.

It's available on the Web now, anyway:

http://www.riverbankcomputing.com/pipermail/pyqt/2007-July/016594.html

Let's look at your original error report again:

   but when I try to import I get:
import libQtWebKit
  
   Traceback (most recent call last):
    File stdin, line 1, in module
   ImportError: ./libQtWebKit.so: undefined symbol:
   _ZN8QWebPage11qt_metacastEPKc
 
  This looks like moc should have been used to process a header file, but
  wasn't. It's not easy to say how you can fix this without knowing more
  about WebKitQt's build process and the one for your own wrappers.

It could be something as simple as not linking against all the correct
libraries. It's difficult to say.

I'll try to build WebKitQt then see what's happening with your wrappers.

David

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt