Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 9:07 am, Sreeram Kandallu wrote: Hi I just have a couple of questions regarding conventions that are being followed in PyQt4. I'm using the '20060226' snapshots of PyQt4 and Sip, and i noticed that the Qt namespace is present in *both* QtCore and QtGui! why is

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sreeram Kandallu
Phil Thompson wrote: The short answer is that the Python objects are placed in the module corresponding to the C++ library in which they are implemented. Does this mean that Qt::WindowFlags and such will be moved from QtCore.Qt to QtGui.Qt? Regards Sreeram signature.asc Description:

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 9:59 am, Sreeram Kandallu wrote: Phil Thompson wrote: The short answer is that the Python objects are placed in the module corresponding to the C++ library in which they are implemented. Does this mean that Qt::WindowFlags and such will be moved from QtCore.Qt to

Re: [PyKDE] sip searchs incorrectly for qmail specs

2006-03-02 Thread Andreas Pakulat
On 02.03.06 00:36:03, Hai Zaar wrote: No matter what I've tried, I've failed to compile sip-4.3.2 - it failed to find qmail specs. You mean Qt mkspecs... I have qt compiled and installed to /usr with the following configure options: That might be the case, but... -fname =

Re: [PyKDE] sip searchs incorrectly for qmail specs

2006-03-02 Thread Hai Zaar
On 3/2/06, Andreas Pakulat [EMAIL PROTECTED] wrote: On 02.03.06 00:36:03, Hai Zaar wrote: No matter what I've tried, I've failed to compile sip-4.3.2 - it failed to find qmail specs. You mean Qt mkspecs... Late night, you know... :) I have qt compiled and installed to /usr with the

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 09:46:03AM +, Phil Thompson wrote: The short answer is that the Python objects are placed in the module corresponding to the C++ library in which they are implemented. Hmm, meaning that this: ---[ Code snippet ]

Re: [PyKDE] sip searchs incorrectly for qmail specs

2006-03-02 Thread Andreas Pakulat
On 02.03.06 12:21:26, Hai Zaar wrote: On 3/2/06, Andreas Pakulat [EMAIL PROTECTED] wrote: On 02.03.06 00:36:03, Hai Zaar wrote: I have qt compiled and installed to /usr with the following configure options: That might be the case, but... -fname = os.path.join(qt_dir,

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 10:21 am, Sundance wrote: On Thu, Mar 02, 2006 at 09:46:03AM +, Phil Thompson wrote: The short answer is that the Python objects are placed in the module corresponding to the C++ library in which they are implemented. Hmm, meaning that this: ---[ Code snippet

Re: [PyKDE] sip searchs incorrectly for qmail specs

2006-03-02 Thread Hai Zaar
To give you an idea how Debian does that. This way you can safely set QTDIR to /usr/share/qt3 and Qt still finds includes, libs, plugins and so on. Yes, but the original problem was that sip could not find qmake specs, once it found and read them, it had no troubles finding, say, libraries

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Giovanni Bajo
Phil Thompson [EMAIL PROTECTED] wrote: Up until recently I had planned (and partially implemented) the idea that a namespace would only appear once and that any objects implemented in other modules would be placed in it. In other words... from PyQt4 import QtCore dir(QtCore) from PyQt4

[PyKDE] Static compilation of PyQt

2006-03-02 Thread Giovanni Bajo
Hello, For the past few months, I have been using a statically-compiled version of PyQt. Statically here means that it's still an external module (.pyd) but it does not depend on the external C++ Qt DLL: the module is totally self-contained. This bring several advantages: - Size. A static

Re: [PyKDE] sip searchs incorrectly for qmail specs

2006-03-02 Thread Andreas Pakulat
On 02.03.06 12:59:23, Hai Zaar wrote: To give you an idea how Debian does that. This way you can safely set QTDIR to /usr/share/qt3 and Qt still finds includes, libs, plugins and so on. Yes, but the original problem was that sip could not find qmake specs, Right and that was caused by you

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Andreas Pakulat
On 02.03.06 12:09:46, Giovanni Bajo wrote: Phil Thompson [EMAIL PROTECTED] wrote: Up until recently I had planned (and partially implemented) the idea that a namespace would only appear once and that any objects implemented in other modules would be placed in it. In other words... from

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 11:09 am, Giovanni Bajo wrote: Phil Thompson [EMAIL PROTECTED] wrote: Up until recently I had planned (and partially implemented) the idea that a namespace would only appear once and that any objects implemented in other modules would be placed in it. In other

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sreeram Kandallu
Giovanni Bajo wrote: Are you saying that this: --- from PyQt4.QtCore import * from PyQt4.QtGui import * dir(Qt) --- won't show the full Qt namespace, thus making PyQt4 unusable without the annoying QtCore/QtGui prefix in front of

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 10:41:45AM +, Phil Thompson wrote: A C++ namespace doesn't have an implementation, it just contributes to name mangling. In Python they have to be implemented by something so there is no direct comparison. Point! Although I feel Giovanni does have a point as well.

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Giovanni Bajo
Phil Thompson [EMAIL PROTECTED] wrote: --- from PyQt4.QtCore import * from PyQt4.QtGui import * dir(Qt) --- won't show the full Qt namespace, thus making PyQt4 unusable without the annoying QtCore/QtGui prefix in front of everything? Yes

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Giovanni Bajo
Sundance [EMAIL PROTECTED] wrote: 1) Having the Qt namespace as an external module. Perfect. I'm +1 on this. 2) Updating QtCore.Qt's _dict_ in the other modules instead of creating a new Qt there. This would be *very* confusing and very implicit. I'm -1000 on this. -- Giovanni Bajo

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
Giovanni Bajo wrote: This would be *very* confusing and very implicit. I'm -1000 on this. Actually, it's more than merely implicit: it's Plain Freaking Magic. And magic is dangerous. I agree that making the Qt namespace a module of its own would be one darn lot better. What I don't know is

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Gerard Vermeulen
On Thu, 2 Mar 2006 12:42:42 +0100 Sundance [EMAIL PROTECTED] wrote: On Thu, Mar 02, 2006 at 10:41:45AM +, Phil Thompson wrote: A C++ namespace doesn't have an implementation, it just contributes to name mangling. In Python they have to be implemented by something so there is no

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Gerard Vermeulen
On Thu, 2 Mar 2006 15:26:50 +0100 Gerard Vermeulen [EMAIL PROTECTED] wrote: I have been wondering for some time if it wouldn't be better to merge QtCore and QtGui into one single module. This resolves the problem of the Qt namespace clashes. Eventually there could be a QtCore module for

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 02:01:35PM +, Phil Thompson wrote: As I said in another reply - I don't see the difference. Whether it's PyQt4.Qt rather than PyQt4.QtCore.Qt, the magic still has to happen when you import QtGui. Well, I think the idea is that the Qt namespace would contain

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 2:26 pm, Gerard Vermeulen wrote: On Thu, 2 Mar 2006 12:42:42 +0100 Sundance [EMAIL PROTECTED] wrote: On Thu, Mar 02, 2006 at 10:41:45AM +, Phil Thompson wrote: A C++ namespace doesn't have an implementation, it just contributes to name mangling. In Python

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Giovanni Bajo
Gerard Vermeulen [EMAIL PROTECTED] wrote: I have been wondering for some time if it wouldn't be better to merge QtCore and QtGui into one single module. This resolves the problem of the Qt namespace clashes. Eventually there could be a QtCore module for people who really only need QtCore

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 2:45 pm, Sundance wrote: On Thu, Mar 02, 2006 at 02:01:35PM +, Phil Thompson wrote: As I said in another reply - I don't see the difference. Whether it's PyQt4.Qt rather than PyQt4.QtCore.Qt, the magic still has to happen when you import QtGui. Well, I think

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 2:38 pm, Gerard Vermeulen wrote: On Thu, 2 Mar 2006 15:26:50 +0100 Gerard Vermeulen [EMAIL PROTECTED] wrote: I have been wondering for some time if it wouldn't be better to merge QtCore and QtGui into one single module. This resolves the problem of the Qt

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 02:58:18PM +, Phil Thompson wrote: What you describe can be implemented, but it means that the Qt module must be linked against the Core and Gui Qt libraries. Oookay, you've lost me there. I thought that, with the exception of convertFromPlainText(), escape() and

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Phil Thompson
On Thursday 02 March 2006 3:43 pm, Sundance wrote: On Thu, Mar 02, 2006 at 02:58:18PM +, Phil Thompson wrote: What you describe can be implemented, but it means that the Qt module must be linked against the Core and Gui Qt libraries. Oookay, you've lost me there. I thought that, with

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 03:15:45PM +, Phil Thompson wrote: I like it - except I would use Qt rather than qt. In fact I really, really like it. Ditto! Giovanni, say: would that also remove the drawback from your awesome static PyQt module project? I looked into the issue of distributing

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Giovanni Bajo
Sundance [EMAIL PROTECTED] wrote: I like it - except I would use Qt rather than qt. In fact I really, really like it. Ditto! Giovanni, say: would that also remove the drawback from your awesome static PyQt module project? I looked into the issue of distributing easy-to-install binaries

[PyKDE] QScrollBar, fixed width

2006-03-02 Thread Patrick Stinson
I am trying to set the width of a vertical scrollbar (or any for that matter) of a QScrollArea. I use PyQt4, kde-3.5.1, and the default plastic syle. The size prints 50 for each scrollbar, but the width does not change. Ideas? thanks in advance. from PyQt4.QtGui import * from PyQt4.QtCore import

Re: [PyKDE] Printing using QPrinter

2006-03-02 Thread Kaleb Pederson
As long as it is going to be fairly simple, you could use QSimpleRichText (alsuming Qt3). It allows for basic html-like styling and tables. It's kind of picky and the html support isn't well documented (well, there are a number of things that are available though not documented). You can