[PyQt] 回复: about the sip wrappers

2010-08-24 Thread 燕子
Thank you .I got it. -- 原始邮件 -- 发件人: "Phil Thompson"; 发送时间: 2010年8月23日(星期一) 下午5:06 收件人: "燕子"; 主题: Re: [PyQt] about the sip wrappers On Mon, 23 Aug 2010 11:30:55 +0800, "燕子" wrote: > Dear sir. > my head file is > myqtlibtest.h: > #ifndef MYQTLIBTEST_H > #d

Re: [PyQt] Next PyQt, SIP and QScintilla Releases

2010-08-24 Thread Jeremy Sanders
Phil Thompson wrote: > Development is finished on the next releases of PyQt, SIP and QScintilla, > so testing your favorite application against current snapshots would be a > good idea... Worked okay for me. I was trying to build PyQt to install in a non-system directory and found out that ther

[PyQt] setCursor does not seem to work as expected in graphicsScene/View

2010-08-24 Thread Christopher M. Nahler
This is a reduced part of a project I am working on (Win7, Python 3.1, PyQt 4.7.3, Qt 4.6.2). I can set different "modes" via keyPressEvent (F1, F2, F3) in the MyView class. There I set different cursors according to the mode in MyView.updateItems(). When I run the code and the mouse is outs

[PyQt] Listview, scrollbar, empty row

2010-08-24 Thread M Chauhan
Hello Experts, I need some empty space in my listview after the last row. And for that I have two options: - move scroll bar beyond it's maximum value, - Or add an empty row in listview without passing via model. I am really interested in knowing how to achieve any of the above or if there's

Re: [PyQt] Listview, scrollbar, empty row

2010-08-24 Thread Sybren A. Stüvel
Can't you solve this with some CSS? Regards, Sybren On Tuesday 24 August 2010 11:35:38 M Chauhan wrote: > Hello Experts, > > I need some empty space in my listview after the last row. > > And for that I have two options: > > - move scroll bar beyond it's maximum value, > > - Or add an empty r

Re: [PyQt] Listview, scrollbar, empty row

2010-08-24 Thread Sybren A. Stüvel
On Tuesday 24 August 2010 13:01:25 you wrote: > Thanks Sybren, Please also send your replies to the mailing list. Using the 'reply to list' button on your email client should do that. > That's an option I did not think of. > > But if I am not wrong, with CSS I cannot play with the > scrollbar/r

Re: [PyQt] Problems creating QApplication instance (backdoor in addTypeSlots)

2010-08-24 Thread Marcin Cieslak
On Thu, 5 Aug 2010, Phil Thompson wrote: On Wed, 4 Aug 2010 15:11:46 +, Marcin Cieslak wrote: Hello, I am pretty new to Qt4 and SIP but I try to find a problem with the startup of the Py-Qt4 application (Hewlett Packard printer toolbox utility from hp-lip package) on my FreeBSD box. (...

Re: [PyQt] setCursor does not seem to work as expected in graphicsScene/View

2010-08-24 Thread Mark Summerfield
Hi Christopher, I think one factor is that you call update() on the items after changing the cursor, but not on the view. I tried this: def updateItems(self): print("view updateItems") m = self.scene().viewMode() if m == MyScene.SELECTMODE: print("is

Re: [PyQt] Pixel Manipulation Very Slow?

2010-08-24 Thread zhangmdev
Hi, I tried SIP to do the pixel manipulation in C/C++. Word is the class I adopted from SIP hello world example. Must have a method return void* void *Word::display() { for(int j=0; j< h; j++) { for(int i=0; i< w; i++) { _data[(j*w+i)*4] = 127;//Blue _data[(j*w+i)*4+1] = 127;//Green _data[(j*

Re: [PyQt] Pixel Manipulation Very Slow?

2010-08-24 Thread zhangmdev
Also there is some experiment about how to get image data from PyQt to C/C++ via SIP. Must let the method receive void* void Word::addColor(void *d) { unsigned char* bits = (unsigned char *)d; for(int j=0; j< _img_h; j++) { for(int i=0; i< _img_w; i++) { _color[(j*_img_w+i)*4] = *bits/255.f;/

Re: [PyQt] QAction, signals, eric4, Windows and Linux...

2010-08-24 Thread David Boddie
On Mon Aug 23 20:07:26 BST 2010, fpp wrote: > On a hunch I looked at the (Py)Qt documentation for QAction -- which > I'd never had to do before because everything was automated by > Designer/eric4. > > And the strange thing is, if I read correctly, QActions have an > "activate()" method, but no "

[PyQt] StyleSheet

2010-08-24 Thread Hugo Léveillé
Im pretty new to style sheet. I know how to set BG color and simple stuff like that but Id like to set more complexe style with TableWidget like headers color, scrollbar and so. I have checked the stylesheet exemples but for table widget, examples are very limited. Is there a place where all the po

[PyQt] Threads, events, signals and slots...

2010-08-24 Thread Peter Milliken
Slowly working my way to learning this stuff but have a question regarding how to update GUI elements when threads are running. The situation is: 1. I have some radiobuttons that I use for input and output: input by the user and then for "output" to display "progress" during an operation (the "op

Re: [PyQt] StyleSheet

2010-08-24 Thread Nick Gaens
Take a look at http://doc.trolltech.com/4.6/stylesheet-reference.html#list-of-properties. On Wed, Aug 25, 2010 at 2:34 AM, Hugo Léveillé wrote: > Im pretty new to style sheet. I know how to set BG color and simple > stuff like that but Id like to set more complexe style with TableWidget > like

[PyQt] Unable to create the C++ code error when building PyQt 4.7.4 bindings for QScintilla 2.4.4

2010-08-24 Thread Jiacun wu
Hello,   After I successfully build and install QScintilla 2.4.4 on Windows XP, I'm trying to build Python bindings with running the following command in Visual Studio 2005 Command Prompt: python configure.py in its Python directory.   The configure.py yields the following error: QScinti

Re: [PyQt] event filters vs subclassing

2010-08-24 Thread David Douard
> On Tue, Aug 3, 2010 at 2:27 PM, Dan Halbert wrote: [...] > The best solution would be if PyQt could be extended with a new > installEventFilter method which also takes an optional list with event > classes you are only interested in. I strongly agree. I would be very helpful to have such python

Re: [PyQt] Threads, events, signals and slots...

2010-08-24 Thread Dan Kripac
Hi Peter, When I have done this in my PyQt apps I simply send a signal straight from the QThread to a function that updates the QProgressBar i.e: inside QThread.run: self.emit( SIGNAL('updateProgress(int,int)'), currentTask, numTasks ) then on your window class: def updateProgressBar( self, cu