Re: [PyQt] lambda slot problem
Ok, reading about the scoping problem with lambda i now understand the problem, activated it is the bool emitted from the clicked signal so i have changed it to: lambda activated, m=msg: self.changeStatus(m, activated) and now works correctly, thanks Brian. If i have understand the way that lambda works i should define inside the lambda expression any variable that i am using in the call and can change in the future, no? Regards, Miguel Angel. Brian Kelley escribió: You are seeing a scoping issue, to be safe, I would write the lambda as follows lambda changeStatus=self.changeStatus,m=msg,a=activated: changeStatus(m,a) This ensures that the bindings of self, activated and msg are what you expect when the lambda function is executed. On 4/2/09 7:16 PM, Linos i...@linos.es wrote: Hello, i suppose i am making any mistake here but i dont know why, for example: for checkbox, msg in ((self.printedCheckBox, printed), (self.finishedCheckBox, finished)): self.connect(checkbox, SIGNAL(clicked(bool)), lambda activated: self.changeStatus(msg, activated)) This one ever passes the last msg, finished, although the checkbox self.printedCheckBox is checked. self.connect(checkbox, SIGNAL(clicked(bool)), functools.partial(self.changeStatus, msg) works ok, why the lambda it is only using the last msg string ever? Regards, Miguel Angel. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] [PyKDE] kioslave example?
Hello, i wanted to make a simple kioslave for the following disadvantage: I have to directorys /files/backuped /files/notbackuped And now i want to make a kioslave myfiles:// that displays a folder which consists of the content of both /files/ directories. Writing support for the slave isn't necessary (in the end it should pop up a dialog that asks you if you want to backup the files). Are there any simple examples for a similar task? I only found the API reference for PyKDE4.kio.KIO.Slave, but that doesn't really help me. Thanks for any help, Lukas ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] PyQt and Acrobat
Hi all, I would like to be able to visualise a pdf document in a widget so as then to add a couple of buttons for different actions and to have the widget integrate into my Gui environment. How to go about doing this ? Does anyone already have something done ? Thanks Rui The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other then the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] selection behavior of a TableView
On 03.04.09 09:36:31, Michael Wyss wrote: Greetings I am currently working on a Model-View-Delegate which works fine so far but I'm not happy with the standard selection behavior and I can't find a way to modify it. I'm using: View: QTableView Model QAbstractTableModel Delegate: QItemDelegate What I want is to change the Shift selection behavior of my TableView. Here an example: What I get when selecting 1/1 shift 2/2 : - 1 2 3 4 1 x x 2 x x What I want when selecting 1/1 shift 2/2 : - 1 2 3 4 1 x x x x 2 x x That is (AFAIK) not supported as you can only choose between whole rows or only items to be selected. So you'll have to implement either a custom view or try to do this by listening to selection-changed signals from the selection model and then modify the selection everytime the user clicks... Andreas -- Try to value useful qualities in one who loves you. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Search for a simple example using OpenGL
Title: Flashmail Hello, I would like to draw for example a 3D triangle in an OpneGL.Best regards. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Search for a simple example using OpenGL
Dnia piątek 03 kwiecień 2009, projet...@club-internet.fr napisał(a): !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 titleFlashmail/title style type=text/css BODY, TABLE, TR, TD, P {margin:0;padding:0;} BODY {background:#FF;} /style /head body Hello, I would like to draw for example a 3D triangle in an OpneGL.brbrBest regards.br/body/html Please be so kind as to NOT use HTML in mailing to the list. Thank you. Cheers Mike ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt