Re: [PyKDE] Suggestions for 3.6 :)

2004-10-15 Thread Gordon Tyler
Jul wrote: As you greatly implemented the bash lexer, it would be nice to have an optional integrated shell console (standard one) as the Python console. If not too hard... It might be interesting to use IPython for the Python console since it can do shell commands as well as Python. Ciao, Gordon

Re: [PyKDE] PyQT, QMainWindow and OpenGL

2004-09-22 Thread Gordon Tyler
dunk wrote: i have generated a file with pyuic and its all great. the main content of the window is open gl. before the opengl widget works perfectly outside the form i have generated. the trouble is that running inside the form it only receives mouse movement events when a button is pressed! no go

Re: [PyKDE] mouse-over/motion signal?

2004-09-21 Thread Gordon Tyler
Alfred Young wrote: However, I haven't been able to find a certain signal or method to reproduce the same kind of functionality. Has anyone out there found a similar method to this? Is this not the mouseMoveEvent in QWidget? See http://doc.trolltech.com/3.3/qwidget.html#mouseMoveEvent for more de

Re: [PyKDE] Confused on connects.

2004-09-21 Thread Gordon Tyler
Hihn, Jason wrote: def 'Canceled' (): print 'Canceled' The above should be: def cancelled(): print 'Cancelled' a=QApplication(sys.argv) w=QWidgetFactory.create('network.ui') a.connect(a, SIGNAL("lastWindowClosed()"), a, SLOT("quit()")) Cancel=w.child('buttonCancel') # HOW DO I CONNECT THI

Re: [PyKDE] Threading QApplications. Possible?

2004-09-20 Thread Gordon Tyler
Trost Johnson wrote: Suppose the minimal program: def foo(): app=QApplication(sys.argv) button=QPushButton("Hello World", None) app.setMainWidget(button) button.show() app.exec_loop() And I say >>> thread.start_new_thread (foo, ()) Then the python console freezes Is it not possi

Re: [PyKDE] ANN: new eric snapshot

2004-09-18 Thread Gordon Tyler
Hi Detlev, When running a script (using F2) that creates a threading.Thread, I get the following error in the Python-Shell when I call the thread's start(): Unhandled exception in thread started by > The following snippet of code should reproduce the problem: <<< from threading import Thread

Re: [PyKDE] Threads and KApplication lock

2004-09-11 Thread Gordon Tyler
Russell Valentine wrote: print "DEBUG: doing the lock" self.parentApp.lock() print "DEBUG: lock worked" IE when it locks up I never see "lock worked". I only have one QThread running. You mean you have one QThread in addition to the one on which the event queue is processed? As far as I recall, d

Re: [PyKDE] Custom QScrollBar'ed widgets

2004-09-03 Thread Gordon Tyler
Sundance wrote: Thank you, but this won't do. I'd need to attach the scrollbar to a custom widget, *not all* of which will scroll, hence making QScrollView useless for this case. Basically, instead of a viewport, the widget would have a QVBox containing several subwidgets, the actual viewport b

Re: [PyKDE] Custom QScrollBar'ed widgets

2004-09-02 Thread Gordon Tyler
Sundance wrote: I would like to attach scrollbars to a custom widget, and I'm not sure how to go about it. What is the simplest/cleanest way of informing the QToolBar of the custom widget's viewport size change (when text is appended, for instance), and to sync the scrollbar with the viewport's

Re: [PyKDE] Vertical alignment of a QLabel in the StatusBar..

2004-09-02 Thread Gordon Tyler
Timothy Grant wrote: Thanks to some help from here I've conquered my first geometry management problem. I now have a QStatusBar into which I am placing some text in a QLabel object. It works exactly as advertised. However, the text appears low on the StatusBar, and I'd love to have some control ove

Re: [PyKDE] Newbie Geometry Management Questions...

2004-09-02 Thread Gordon Tyler
Timothy Grant wrote: Two questions on geometry management: 1) I have written some code containing a QSplitter, 2 QListViews, and a QStatusBar. The QSplitter and the QStatusBar are then placed into a QVBox. This works great until I resize the window, and then the StatusBar starts to increase in hei

Re: [PyKDE] Custom sorting function for the QListView widget

2004-07-04 Thread Gordon Tyler
Fernando Jorge Silveira Filho wrote: About the C++ extension issue, how do I go about implementing an extension? Is there some sort of tutorial on this? I have to admit that I am still sort a Python newbie. I am willing to try it anyway, since I still think that if I can solve this on Python the

Re: [PyKDE] A simple PyQt program

2004-06-26 Thread Gordon Tyler
Joshua wrote: TypeError: update() takes exactly 2 arguments (3 given) I don't understand this, since I only gave update 2 arguments. If anyone could shed some light on this, I'd greatly appreciate it. Here's the code: This is something fairly fundamental to Python programming, so you have to make

Re: [PyKDE] eric3 - debugging & svn integration

2004-06-13 Thread Gordon Tyler
Detlev Offenbach wrote: 3. svn checkout forces '/trunk' onto the end of the repository path if no tag is specified. what I really wanted was a 'just use _this_ path' setting. changing line 177 in subversion.py to svnUrl = vcsDir had the effect I was after. The subversion integration is following th

Re: [PyKDE] eric3 question ... project

2004-05-27 Thread Gordon Tyler
Dave S wrote: ...mmm... refactoring ... some kind of speeding up ? - Ill give it a whirl. Refactoring is the process of incrementally improving the design/implementation of code while retaining its behaviour. An example of a particular refactoring is Extract Method, where a code fragment is turn

Re: [PyKDE] Implementing un-enabled Qt modules

2004-05-25 Thread Gordon Tyler
Eron Lloyd wrote: How difficult would it be to provide wrappers for modules in Qt currently not enabled in PyQt, such as XML and Networking? In developing applications, I can see the benefits of having a single API for even these items as opposed to the python equivalents. Since your application

Re: [PyKDE] Newbie MDI question

2004-05-25 Thread Gordon Tyler
John Fabiani wrote: When I create a QMainWindow (my main window) I add my menu's etc...from my menu actions I want to open a window in the space below the menu. The type of window is the question. Is the type of the new window also a QMainWindow (my child window)without menu's? If this is cor

[PyKDE] PyKDE 3.8 compilation error

2004-01-30 Thread Gordon Tyler
Hi all, Since KDE 3.1.5 is now in Debian unstable I have finally upgraded from the Woody 3.1.4 debs (which were compiled with gcc-2.95) to the Debian unstable KDE debs (which are compiled with gcc3). This allows me to use Ricardo's python-qt3, etc. debs. So I have the 3.8 version of the python

Re: [PyKDE] Little Python helpers for PyQt

2004-01-22 Thread Gordon Tyler
Torsten Marek wrote: def ListBoxIterator(listbox, selectedOnly = False): i = listbox.firstItem() while i: if selectedOnly and not i.isSelected(): continue yield i i = i.next() return If I'm not mistaken, passing True to selectedOnly will make that fu

Re: [PyKDE] ANN: PyQt v3.9, SIP v3.9, SIP v4.0rc1 Released

2003-12-07 Thread Gordon Tyler
Jim Bublitz wrote: I haven't really looked at sip/PyQt 3.9 yet, but I expect PyKDE as currently configured will have difficulty building with them only because of build system changes. I'll be releasing a PyKDE 3.8.1 as soon as I can finsih it and probably a PyKDE 3.9 followed by 4.0. The latte

Re: [PyKDE] Updating PyQt widgets question

2003-11-19 Thread Gordon Tyler
Eric Williams wrote: I've re-written my app so that it uses a QTimer and timerEvent method to update the widgets, and that the long-running routine (actually an FTP download) runs in a thread; that works like I expected. I guess my question is, is using a QTimer the 'correct' way to update widg

Re: [PyKDE] Need to know "who" triggers a callback?

2003-11-18 Thread Gordon Tyler
kscalet wrote: Gordon Tyler wrote: kscalet wrote: what would be the best approach in finding out, if a signal is send due to a "real" gui action like key-presses and mouse-clicks, or due to a programmatic action like setButton, setCurrentText, etc on a specific widget. It's

Re: [PyKDE] Qt data structure support

2003-11-17 Thread Gordon Tyler
Eron Lloyd wrote: Moving from Python to assembler would be an effort of insanity ;-). I guess I was simply thinking of the large number of overlap between Qt and Python, for areas such as container types, network sockets, threads, XML, datetime, etc. and wondering whether it was better to go on

Re: [PyKDE] Need to know "who" triggers a callback?

2003-11-17 Thread Gordon Tyler
kscalet wrote: what would be the best approach in finding out, if a signal is send due to a "real" gui action like key-presses and mouse-clicks, or due to a programmatic action like setButton, setCurrentText, etc on a specific widget. It's often needed to trigger some action only in the former ca

Re: [PyKDE] setCaption for windows version

2003-10-27 Thread Gordon Tyler
James Lamanna wrote: self.setCaption( self.tr("Internationalization Example" ) ); Don't you need to initialize the QTranslator stuff before using tr()? For example, after you've created the QApplication: # translation file for Qt qt = QTranslator(None); qt.load("qt_" + QTex

Re: [PyKDE] PyKDE update

2003-09-29 Thread Gordon Tyler
David Boddie wrote: On Sun, 28 Sep 2003 22:38:39, Jim Bublitz wrote: If anyone's urgently in need of the next PyKDE release, or has any other input, please speak up. I can put totgether another rc release (more like a snapshot) in a few days if necessary. Is there any way to cast Python QObjec

Re: [PyKDE] PyKDE update

2003-09-29 Thread Gordon Tyler
On September 29, 2003 01:38 am, Jim Bublitz wrote: > The next release will also support KDE 3.1.4. That's already done > too, and doesn't have any major changes affecting PyKDE. Current > releases will probably build against KDE 3.1.4 as is. Good news. I've recently upgraded my machine from Debain

Re: [PyKDE] signatures for qt-classes?

2003-09-14 Thread Gordon Tyler
Phil Thompson wrote: On Sunday 14 September 2003 10:51 am, holger krekel wrote: However, i am missing two things, mainly docstrings and signature information. While i can imagine that providing docstrings is a major task i wonder if it's possible to maintain a more telling signature than '*args'

Re: [PyKDE] QPushButton

2003-09-02 Thread Gordon Tyler
GuineaPig wrote: I'm working with pyQt and I have a widget with 40 QPushButtons (toggles). On 'toggled()' the buttons emit a signal to a function. In this function I'd like to find out wich button was pressed. I'm thinking about iterating through all the buttons to check theirs state but I c

Re: [PyKDE] PyKDE-3.8rc1 Released

2003-08-31 Thread Gordon Tyler
On August 31, 2003 03:05 am, Jim Bublitz wrote: > I just put PyKDE-3.8rc1 up at SourceForge: > (http://www.sourceforge.net/projects/pykde) > > This isn't the final release, which is probably a week or two > away. It has the following new stuff: Are you going to be including David Boddie's ioslave

Re: [PyKDE] PyKDE-3.7-4 Release

2003-08-15 Thread Gordon Tyler
On August 15, 2003 06:56 pm, Jim Bublitz wrote: > Otherwise it's necessary to modify sys.path first. That means a Yes, that would be bad. > I think it makes sense for build.py to search sys.path, but > anyone smart enough to legitimately locate the modules outside > of sys.path somewhere should b

Re: [PyKDE] PyKDE-3.7-4 Release

2003-08-15 Thread Gordon Tyler
On August 15, 2003 04:07 pm, you wrote: > No - it's a feature :) Hmmm ;) > > python 2.2 installed into /usr (deb package), sip 3.7 and pyqt > > 3.7 installed into /usr/local. > > build.py wasn't written to allow for that possibility, but maybe > should be (somewhat) The reason I do this is t

Re: [PyKDE] PyKDE-3.7-4 Release

2003-08-15 Thread Gordon Tyler
On August 15, 2003 02:21 am, Jim Bublitz wrote: > I'm in the process of doing some final test builds of PyKDE > 3.7-4, and barring any problems should be emailing the release > to Phil tonight. It should be at http://riverbankcomputing.co.uk > within 24 hours. I'm not sure if this is a bug but I h

Re: [PyKDE] Listbox returns dictionary key?

2003-08-14 Thread Gordon Tyler
On August 7, 2003 12:13 am, Peter Clark wrote: > Ah-ha! I actually tried that, but I made a mistake; on the analogy of > "selected(int)", I tried omitting the "QString &" part. So is it only safe > to omit "index"? The documentation has the following: > > void selected ( int index ) > void se

Re: [PyKDE] Listbox returns dictionary key?

2003-08-09 Thread Gordon Tyler
On August 6, 2003 11:31 pm, Peter Clark wrote: > self.connect(self.listBox, SIGNAL("selected(int)"), > self.printWhatWeSelected) > > returns '0' if I select cat, '1' for 'dog', etc. To get the dictionary > value for that selection, I could do > > d[k[int]] > > but this requires that I pass both d a

Re: [PyKDE] PyKDE - almost

2003-08-06 Thread Gordon Tyler
list (Pete's SMP patch, a bunch of stuff Gordon Tyler worked on, and some other stuff). I'll be getting to that next (after I think most, if not all, of my patches were to get PyKDE compiling with sip/PyQt 3.6, so there may not be anything of value in them since you've already ac

Re: [PyKDE] More documention?

2003-08-06 Thread Gordon Tyler
Peter Clark wrote: Between the example programs packaged with PyQt and Boudewijn Rempt's book, I've been able to make pretty decent headway in learning PyQt through trial and error. However, at this point, I'm mostly parroting what I see, with only a vague comprehension as to what's going on.

Re: [PyKDE] IOSlaves - initial attempts

2003-07-12 Thread Gordon Tyler
Wido Depping wrote: On Monday 07 July 2003 23:08, Kasper Souren wrote: Cool. I am interested in controlling noatun myself. Can this be done with IOSlaves? playlist, too. Somewhere on the web is a tutorial for using dcop. In python you would spawn a dcop-process with the needed parameters. That's

[PyKDE] QT/Mac to be licensed under GPL

2003-06-18 Thread Gordon Tyler
Hi all, I just saw this press release on Trolltech's site: http://www.trolltech.com/newsroom/announcements/0129.html "Trolltech today announced that Qt/Mac will be released under the GPL (GNU General Public License) at Apple's World Wide Developer Conference (WWDC) 2003 in San Francisco on

Integrating PyChecker into eric (Was: [PyKDE] [ANNOUNCE] Seventhdevelopment release of PythonCAD available)

2003-06-04 Thread Gordon Tyler
Art Haas wrote: I'd like to publicly acknowledge and thank the developers and maintainers of PyChecker for the work they've done in developing this most useful tool. PyChecker is an effective tool for identifying errors in Python code, and I've been using it more and more. PyChecker gets a big reco

Re: [PyKDE] newbie question about dealing with Images in pyQt

2003-06-04 Thread Gordon Tyler
Adam Shimali wrote: I assume I need to create a QImage object from each image file name. Can I then place each image in a QGridLayout or do I need to put the image on a panel and then stick each panel into the grid? A QGridLayout is a layout manager. It has to be used in combination with a contai

Re: [PyKDE] Segmentation fault with latest snapshot of sip & PyQt

2003-06-03 Thread Gordon Tyler
Gordon Tyler wrote: I'm going to poke around the KDE source for the HighCOlor plugin to see if I can figure out what it's doing when it calls into libstdc++. Looking at kdelibs/kstyles/highcolor/highcolor.cpp in the HighColorStyle::eventFilter() method, the following statement occurs

Re: [PyKDE] Segmentation fault with latest snapshot of sip & PyQt

2003-06-03 Thread Gordon Tyler
Phil Thompson wrote: #0 0x400f9a93 in __dynamic_cast () from /usr/lib/libstdc++.so.5 #1 0x414b561f in HighColorStyle::eventFilter () from /usr/lib/kde3/plugins/styles/highcolor.so Seeing as how the KDE HighColor style plugin was the last library involved, I just tried changing the Qt style fr

Re: [PyKDE] Segmentation fault with latest snapshot of sip & PyQt

2003-06-02 Thread Gordon Tyler
On June 1, 2003 04:35 pm, Phil Thompson wrote: > It works fine for me. What version did it last work for you? A gdb > backtrace would be useful. I was previously using sip 3.6 and PyQt 3.6. Here's the gdb backtrace for examples3/addressbook.py: Program received signal SIGSEGV, Segmentation fault

[PyKDE] Segmentation fault with latest snapshot of sip & PyQt

2003-06-02 Thread Gordon Tyler
Hi all, I just downloaded and compiled the latest snapshot of sip and PyQt, 20030531. I applied the attached patch to PyQt to make it compile on Debian. I'm using Python 2.2.2 and Qt 3.1.2 from Debian Woody. However, certain PyQt applications crash with a "Segmentation fault" output in the con