Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Greg Fortune
On Wednesday 12 March 2003 11:31 am, Jim Bublitz wrote:
> On 12-Mar-03 Gerard Vermeulen wrote:
> > On Wed, Mar 12, 2003 at 10:27:51AM -0800, Greg Fortune wrote:
> >> > Or use the -c flag, then you only need to get a coffee.
> >>
> >> he he, I'm on a PIII 550 so compiling anything takes a little
> >> while :)
> >>
> >> What does it do?  If there is no disadvantage to using -c, could
> >> you include that flag by default?
> >
> > It concatenates all sip generated C++ files into a single file.
> > So in the end all header files get parsed once, instead of many
> > times.
> >
> > Some compilers (gcc-2.96) are memory hungry and will start
> > swapping if you use the -c switch (this is also more likely to
> > happen if you have compile Qt with -O3 or more). If the compiler
> > starts swapping to disk you can stay in bed the next day :-)
>
> The qt module needs about 100MB of RAM with the -c switch, so on a
> low memory machine (around 128MB or less) it would be best to not
> use -c, or at least use it without running X. Otherwise, swapping
> depends on what you have loaded.
>
> On the plus side, it cuts compile times for PyQt and PyKDE by about
> 80% (on the same machine).
>
> On a 600MHz Celeron/64MB RAM/no -c I've had PyKDE take as long as
> 3-1/2 hours to compile. On an Athlon1900/1GB DDR/-c it takes under
> 6 minutes. I would think your 550MHz would do PyQt under 15 minutes
> if you have enough RAM and use -c.


Wow!  That's huge! I'll try that next time I have to compile.  Thanks to 
everyone for the tip...

Greg

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric (reprise)

2003-03-12 Thread Dimitris Garanatsios
Hi there,

OK, thanks to some pointers from some of you and an earlier thread on this 
mailing list, I get past my first QScintilla problem. I followed this 
advice:

http://mats.gmd.de/pipermail/pykde/2003-March/004747.html

and added $QTDIR/lib to /etc/ld.so.conf (shouldn't the build process handle 
this somehow?)

...and got qtext with qscintilla support to import properly. However, now I 
have another problem.
Hey! this advise was supposed to be mine! :-)


When I run the eric installer now, I get:
 Sorry, you must have PyQt 3.6 or snapshot-20021217 or higher.
 PyQt 3.6 doesn't seem to exist, so I downloaded the following:
 sip snapshot 20030306
pyqt snapshot 20030309
qscintilla 20030309
I didn't catch you before reinstalling PyQt :-(
Here is how i installed the latest eric-snapshot-20030309 using:
--- sip-x11-gpl-3.5
--- qscintilla-1.49-x11-gpl-0.3
--- PyQt-x11-gpl-3.5
I had to comment some code from eric's sources and limit it's functionality 
a little bit :-(

The changes i made are:

file install.py
--- line 289 was changed to: if maj < 3 or (maj == 3 and min < 5):
   Now it's happy with PyQt v3.5.0 ;-)
file QScintilla/Editor.py
--- line 13 was changed to:
   from qtext import QextScintilla#, QextScintillaPrinter
   In the version of qscintilla i'm using it doesn't seem to exist a 
"QextScintillaPrinter"
   Check this if you want, if you find it this is not necessary...

--- line 20 was completely commented: #from Printer import Printer
   This is the class that uses "QextScintillaPrinter" which is now 
commented.
   Ofcourse, this (and the following two) change depends on qscintilla too.

--- line 522, method printFile of class Editor: changed it so that it 
returns immediately upon calling.

--- line 548, method printSelection of class Editor: changed it so that it 
returns immediately upon calling

After that eric was installed (and run too) with no trouble at all. So 
unless you need to print your code with eric (i can live with printing 
disabled), this is a quick (and also an ugly) solution.

I hope i helped and that you won't have to recompile the whole [EMAIL PROTECTED] damn 
library ("[EMAIL PROTECTED]" goes to the time i needed to compile it on my poor pc until 
i got the advise you mention - 3 installations...)

Regards,
Dimitris
_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric (reprise)

2003-03-12 Thread Phil Thompson
On Wednesday 12 March 2003 9:28 pm, WELCH,DONALD J (HP-Vancouver,ex1) wrote:
> OK, thanks to some pointers from some of you and an earlier thread on this
> mailing list, I get past my first QScintilla problem. I followed this
> advice:
>
> http://mats.gmd.de/pipermail/pykde/2003-March/004747.html
> 
>
> and added $QTDIR/lib to /etc/ld.so.conf (shouldn't the build process handle
> this somehow?)
>
> ...and got qtext with qscintilla support to import properly. However, now I
> have another problem.
>
> When I run the eric installer now, I get:
>
> Sorry, you must have PyQt 3.6 or snapshot-20021217 or higher.
>
> PyQt 3.6 doesn't seem to exist, so I downloaded the following:
>
> sip snapshot 20030306
> pyqt snapshot 20030309
> qscintilla 20030309
>
> When I try to compile qscintilla, I get the following error:
>
> g++ -c -pipe -w -I/usr/include/fontconfig -I/usr/include/Xft2 -O2
> -march=i386 -mcpu=i686 -fno-use-cxa-atexit -fno-exceptions -D_REENTRANT
> -fPIC  -DQEXTSCINTILLA_MAKE_DLL -DQT -DSCI_LEXER -DQT_NO_DEBUG
> -DQT_THREAD_SUPPORT -I. -I../include -I../src -I/usr/lib/qt3-gcc3.2/include
> -I/usr/lib/qt3-gcc3.2/mkspecs/default -o ScintillaQt.o ScintillaQt.cxx
> ScintillaQt.cxx: In constructor `QtCallTip::QtCallTip(CallTip*)':
> ScintillaQt.cxx:459: `WStyle_Splash' undeclared (first use this function)
> ScintillaQt.cxx:459: (Each undeclared identifier is reported only once for
> each
>function it appears in.)
> make: *** [ScintillaQt.o] Error 1
>
> Any ideas? Is all this new stuff compatible with Qt 3.0.5? Is it time to
> give up and use vi? 8^)

Replace WStyle_Splash with...

WStyle_NoBorder|WStyle_StaysOnTop|WX11BypassWM

I'll fix it for the next snapshot.

Phil

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


[PyKDE] Canvassprite and transparent picture

2003-03-12 Thread Lars Kirkhus

Hi, I have a problem/challenge here that I hope some of you might have
some input on; I'm working on a GUI where I use canvas with
QCanvasSprite-objects to display pictures that represents different
nodes.

My problem is that parts of these pictures are transparent and I
want to be able to detect when a user "clicks" these parts. This I want
to do so it won't be possible to select/move a node when the user
selects a part of the image thats outside the image-shape. 

Does anyone know if this is possible and where I should start looking? 


Lars Kirkhus

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


[PyKDE] Problem building PyQt, QScintilla, and eric (reprise)

2003-03-12 Thread WELCH,DONALD J (HP-Vancouver,ex1)
Title: Message



OK, thanks to some 
pointers from some of you and an earlier thread on this mailing list, I get past 
my first QScintilla problem. I followed this advice:
 
http://mats.gmd.de/pipermail/pykde/2003-March/004747.html
 
and added $QTDIR/lib 
to /etc/ld.so.conf (shouldn't the build process handle this 
somehow?)
 
...and got qtext 
with qscintilla support to import properly. However, now I have another 
problem.
 
When I run the eric 
installer now, I get:
 
Sorry, you must have 
PyQt 3.6 or snapshot-20021217 or higher.
 
PyQt 3.6 doesn't 
seem to exist, so I downloaded the following:
 
sip snapshot 
20030306
pyqt snapshot 
20030309
qscintilla 
20030309
 
When I try to 
compile qscintilla, I get the following error:
 
g++ -c -pipe -w 
-I/usr/include/fontconfig -I/usr/include/Xft2 -O2 -march=i386 -mcpu=i686 
-fno-use-cxa-atexit -fno-exceptions -D_REENTRANT -fPIC  
-DQEXTSCINTILLA_MAKE_DLL -DQT -DSCI_LEXER -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I. 
-I../include -I../src -I/usr/lib/qt3-gcc3.2/include 
-I/usr/lib/qt3-gcc3.2/mkspecs/default -o ScintillaQt.o 
ScintillaQt.cxxScintillaQt.cxx: In constructor 
`QtCallTip::QtCallTip(CallTip*)':ScintillaQt.cxx:459: `WStyle_Splash' 
undeclared (first use this function)ScintillaQt.cxx:459: (Each undeclared 
identifier is reported only once for each   function it appears 
in.)make: *** [ScintillaQt.o] Error 1
Any ideas? Is all 
this new stuff compatible with Qt 3.0.5? Is it time to give up and use vi? 
8^)
 
Thanks,
 
Don


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Jim Bublitz
On 12-Mar-03 Gerard Vermeulen wrote:
> On Wed, Mar 12, 2003 at 10:27:51AM -0800, Greg Fortune wrote:

>> > Or use the -c flag, then you only need to get a coffee.
 
>> he he, I'm on a PIII 550 so compiling anything takes a little
>> while :)
 
>> What does it do?  If there is no disadvantage to using -c, could
>> you include that flag by default?

> It concatenates all sip generated C++ files into a single file.
> So in the end all header files get parsed once, instead of many
> times.
 
> Some compilers (gcc-2.96) are memory hungry and will start
> swapping if you use the -c switch (this is also more likely to
> happen if you have compile Qt with -O3 or more). If the compiler
> starts swapping to disk you can stay in bed the next day :-)

The qt module needs about 100MB of RAM with the -c switch, so on a
low memory machine (around 128MB or less) it would be best to not
use -c, or at least use it without running X. Otherwise, swapping
depends on what you have loaded.

On the plus side, it cuts compile times for PyQt and PyKDE by about
80% (on the same machine). 

On a 600MHz Celeron/64MB RAM/no -c I've had PyKDE take as long as
3-1/2 hours to compile. On an Athlon1900/1GB DDR/-c it takes under
6 minutes. I would think your 550MHz would do PyQt under 15 minutes
if you have enough RAM and use -c.

Jim

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Ricardo Javier Cardenes Medina
On Wed, Mar 12, 2003 at 10:45:29AM -0800, Jim Bublitz wrote:
> > Or use the -c flag, then you only need to get a coffee.
> 
> I didn't know -c stood for "coffee" -- I always thought it was for
> "Cardenes" :)

Lol. I bet for "concatenate" :D

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Gerard Vermeulen
Did you build the qtext (QScintilla) extension (means, did build.py detect
libqscintilla.so)?

Try:

[EMAIL PROTECTED] packer]$ python
Python 2.2.2 (#1, Oct 23 2002, 12:12:09)
[GCC 2.96 2731 (Mandrake Linux 8.2 2.96-0.76mdk)] on linux-i386
Type "help", "copyright", "credits" or "license" for more information.
>>> import qtext
>>>

Gerard

On Wed, Mar 12, 2003 at 12:46:07PM -0500, WELCH,DONALD J (HP-Vancouver,ex1) wrote:
> Hello,
>  
> I'm having a problem getting PyQT compiled with Qscintilla support. I am
> running RH8.0 and Python 2.2.1. Here are the steps I took:
> (BTW, these are not the versions of SIP and PyQt that ship with RH8.0. I am
> trying to update to the latest becuase of the image collection bug that
> existed in the shipped version.)
>  
> 1. Build SIP (sip-x11-gpl-3.5) using: python build.py -lqt-mt
>  
> 2. SIP builds OK and reports the following info:
>  /usr/lib/python2.2/site-packages is the SIP install dir
>  /usr/include/python2.2 contains Python.h
>  /usr/lib/qt3-gcc3.2 is the base Qt dir
>  /usr/lib/qt3-gcc3.2/include contains qglobal.h
>  Qt 3.0.5 free edition is being used
>  /usr/lib/qt3-gcc3.2bin/qmake will be used for Makefiles
>  Qt thread support is enabled
>  
> 3. Build qscintilla (qscintilla-1.49-x11-gpl-0.3) using in qt directory
> using: qmake -o Makefile qscintilla.pro, make, copy headers and .qm files to
> $QTDIR area. Works OK.
>  
> 4. Build PyQt (PyQt-x11-gpl-3.5) using: python build.py, make, make install.
>  
> 5. Builds OK. Test PyQt install with some sample apps and works fine. Image
> file bug is fixed, so I know the new version of PyQt is there.
>  
> 6. Try to install eric (eric-3.0.1) using: python install.py
>  
> 7. Eric reports error: 
>  Sorry, please install QScintilla and/or reinstall
>  PyQt with QScintilla support.
>  
> Am I missing a step or configuration setting? How do you tell PyQt to
> include QScintilla support? I didn't see any mention of it in the PyQt
> instructions or FAQ.
>  
> All help will be much appreciated!
>  
> Thanks,
>  
> Don

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Phil Thompson
On Wednesday 12 March 2003 6:27 pm, Greg Fortune wrote:
> On Wednesday 12 March 2003 10:08 am, Phil Thompson wrote:
> > On Wednesday 12 March 2003 5:57 pm, Greg Fortune wrote:
> > > You'll want to build and install qscintilla before building sip.
> >
> > That won't make any difference.
>
> ???  Doesn't sip look for the qscintilla header files?  I had no end of
> problems trying to get it installed and ran into the exact same message a
> bunch of times.  If I installed qscintilla first, it worked.

Nope - SIP is completely independent of QScintilla.

Phil

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Gerard Vermeulen
On Wed, Mar 12, 2003 at 10:27:51AM -0800, Greg Fortune wrote:
> >
> > Or use the -c flag, then you only need to get a coffee.
> 
> he he, I'm on a PIII 550 so compiling anything takes a little while :)
> 
> What does it do?  If there is no disadvantage to using -c, could you include 
> that flag by default?
>
It concatenates all sip generated C++ files into a single file. So in the
end all header files get parsed once, instead of many times.

Some compilers (gcc-2.96) are memory hungry and will start swapping if
you use the -c switch (this is also more likely to happen if you have
compile Qt with -O3 or more). If the compiler starts swapping to disk
you can stay in bed the next day :-)

Gerard

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Jim Bublitz
On 12-Mar-03 Phil Thompson wrote:
> On Wednesday 12 March 2003 5:57 pm, Greg Fortune wrote:
>> You'll want to build and install qscintilla before building sip.
 
> That won't make any difference.
 
> It's more likely that a later version of eric is required (ie. a
> snapshot).
 
>> General upgrade order:

>> 1) build/install qscintilla
>> 2) build/install sip
>> 3) build/install PyQt
>> 4) go to bed
 
> Or use the -c flag, then you only need to get a coffee.

I didn't know -c stood for "coffee" -- I always thought it was for
"Cardenes" :)

Jim
 
>> 5) wake up in the morning.  Congrats.  PyQt is done ;o)
>> 6) build/install eric

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Greg Fortune
On Wednesday 12 March 2003 10:08 am, Phil Thompson wrote:
> On Wednesday 12 March 2003 5:57 pm, Greg Fortune wrote:
> > You'll want to build and install qscintilla before building sip.
>
> That won't make any difference.

???  Doesn't sip look for the qscintilla header files?  I had no end of 
problems trying to get it installed and ran into the exact same message a 
bunch of times.  If I installed qscintilla first, it worked.

Donald, you should be able to check for qscintilla support by starting python 
and typing
import qtext

If it imports, then qscintilla got compiled in and I'm probably very wrong 
;o)

>
> It's more likely that a later version of eric is required (ie. a snapshot).
>
> > General upgrade order:
> >
> > 1) build/install qscintilla
> > 2) build/install sip
> > 3) build/install PyQt
> > 4) go to bed
>
> Or use the -c flag, then you only need to get a coffee.

he he, I'm on a PIII 550 so compiling anything takes a little while :)

What does it do?  If there is no disadvantage to using -c, could you include 
that flag by default?

>
> > 5) wake up in the morning.  Congrats.  PyQt is done ;o)
> > 6) build/install eric
>
> Phil
>
> ___
> PyKDE mailing list[EMAIL PROTECTED]
> http://mats.gmd.de/mailman/listinfo/pykde

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Phil Thompson
On Wednesday 12 March 2003 5:57 pm, Greg Fortune wrote:
> You'll want to build and install qscintilla before building sip.

That won't make any difference.

It's more likely that a later version of eric is required (ie. a snapshot).

> General upgrade order:
>
> 1) build/install qscintilla
> 2) build/install sip
> 3) build/install PyQt
> 4) go to bed

Or use the -c flag, then you only need to get a coffee.

> 5) wake up in the morning.  Congrats.  PyQt is done ;o)
> 6) build/install eric

Phil

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


Re: [PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread Greg Fortune
You'll want to build and install qscintilla before building sip.

General upgrade order:

1) build/install qscintilla
2) build/install sip
3) build/install PyQt
4) go to bed
5) wake up in the morning.  Congrats.  PyQt is done ;o)
6) build/install eric

Greg


On Wednesday 12 March 2003 09:46 am, you wrote:
> Hello,
>
> I'm having a problem getting PyQT compiled with Qscintilla support. I am
> running RH8.0 and Python 2.2.1. Here are the steps I took:
> (BTW, these are not the versions of SIP and PyQt that ship with RH8.0. I am
> trying to update to the latest becuase of the image collection bug that
> existed in the shipped version.)
>
> 1. Build SIP (sip-x11-gpl-3.5) using: python build.py -lqt-mt
>
> 2. SIP builds OK and reports the following info:
>  /usr/lib/python2.2/site-packages is the SIP install dir
>  /usr/include/python2.2 contains Python.h
>  /usr/lib/qt3-gcc3.2 is the base Qt dir
>  /usr/lib/qt3-gcc3.2/include contains qglobal.h
>  Qt 3.0.5 free edition is being used
>  /usr/lib/qt3-gcc3.2bin/qmake will be used for Makefiles
>  Qt thread support is enabled
>
> 3. Build qscintilla (qscintilla-1.49-x11-gpl-0.3) using in qt directory
> using: qmake -o Makefile qscintilla.pro, make, copy headers and .qm files
> to $QTDIR area. Works OK.
>
> 4. Build PyQt (PyQt-x11-gpl-3.5) using: python build.py, make, make
> install.
>
> 5. Builds OK. Test PyQt install with some sample apps and works fine. Image
> file bug is fixed, so I know the new version of PyQt is there.
>
> 6. Try to install eric (eric-3.0.1) using: python install.py
>
> 7. Eric reports error:
>  Sorry, please install QScintilla and/or reinstall
>  PyQt with QScintilla support.
>
> Am I missing a step or configuration setting? How do you tell PyQt to
> include QScintilla support? I didn't see any mention of it in the PyQt
> instructions or FAQ.
>
> All help will be much appreciated!
>
> Thanks,
>
> Don

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde


[PyKDE] Problem building PyQt, QScintilla, and eric

2003-03-12 Thread WELCH,DONALD J (HP-Vancouver,ex1)
Title: Message



Hello,
 
I'm 
having a problem getting PyQT compiled with Qscintilla support. I am running 
RH8.0 and Python 2.2.1. Here are the steps I took:(BTW, these are not the 
versions of SIP and PyQt that ship with RH8.0. I am trying to update to the 
latest becuase of the image collection bug that existed in the shipped 
version.)
 
1. Build SIP (sip-x11-gpl-3.5) using: python 
build.py -lqt-mt
 
2. SIP builds OK and reports the following 
info: /usr/lib/python2.2/site-packages is the SIP install 
dir /usr/include/python2.2 contains 
Python.h /usr/lib/qt3-gcc3.2 is the base Qt 
dir /usr/lib/qt3-gcc3.2/include contains qglobal.h Qt 3.0.5 
free edition is being used /usr/lib/qt3-gcc3.2bin/qmake will be used 
for Makefiles Qt thread support is enabled
 
3. Build qscintilla (qscintilla-1.49-x11-gpl-0.3) 
using in qt directory using: qmake -o Makefile qscintilla.pro, make, copy 
headers and .qm files to $QTDIR area. Works OK.
 
4. Build PyQt (PyQt-x11-gpl-3.5) using: python 
build.py, make, make install.
 
5. Builds OK. 
Test PyQt install with some sample apps and works fine. Image file bug is fixed, 
so I know the new version of PyQt is there.
 
6. Try to install eric (eric-3.0.1) using: python 
install.py
 
7. Eric reports error:  Sorry, please 
install QScintilla and/or reinstall PyQt with QScintilla 
support.
 
Am I missing a step or configuration setting? How 
do you tell PyQt to include QScintilla support? I didn't see any mention of it 
in the PyQt instructions or FAQ.
 
All help will be much appreciated!
 
Thanks,
 
Don