[PyQt] removeWidget

2011-08-24 Thread uahmed
Hi I want to add widget in (f1) function and want to remove the widget from (f2) function . I tried the same thing in same function it do work but when i try to remove the widget from another it doesnt . Any help ? Code : import sys,os from functools import partial from PyQt4 import QtGui, QtCo

[PyQt] send a QVariant in a QUdpSocket Datagram?

2011-08-24 Thread emmanuel_mayssat
Hello, I have been able to send a QVariant in over the network using a QTcpSocket and QDataStream. now I would like to send the same QVariant over a QUdpSocket. The issue is that the type of a datagram is string or QByteArray (Not QDataStream) So I send my datagram as a QByteArray def iss

Re: [PyQt] how aim same function to other tables

2011-08-24 Thread Josh Stratton
Can you pull the table name out of the event object? Another option is to make a unique function for each table, which calls the addFriend function itself with the table name. That way you won't have to duplicate addFriend code. example: addFriend(event, table): def table1AddFriend(event)

Re: [PyQt] QItemDelegate createEditor - help with focusOut on custom widget

2011-08-24 Thread James Holstead
Below is a working example. You'll see the PathWidget looses focus when a combo box is selected. How can I delegate focus back to the patchwidget when the user clicks outside of the entire TableView? from PyQt4.QtGui import * from PyQt4.QtCore import * import sys import datetime class testView

[PyQt] how aim same function to other tables

2011-08-24 Thread Tony Peña
hi I want to use same function to other tables like this tablename = Searchtable but could be table1 table2 table3 ... table n addAction.triggered.connect(self.addFriend) <- This works ok def addFriend( self, event): tablename = 'SearchtableWidget' table_obj = getattr(self.ui, tablename) cu

Re: [PyQt] pyqt behavior change

2011-08-24 Thread Phil Thompson
On Wed, 24 Aug 2011 12:51:52 +0100, Ingrid Dahl-Olsen wrote: > Hi, > > Sorry for commenting on a post this old, but I've only just run into > this change as I'm using PyQt in maya at work, and so have been stuck > with using 4.7.2 until very recently when it was bumped up to 4.8.4. > > Just ou

Re: [PyQt] Adding a table to GUI in QT Designer

2011-08-24 Thread Nader Abedrabbo
Thanks Tony. I was able to add a context menu to the table with the functionality I need and now can Cut&Paste from excel to my code with no problems. One issue I still have is that I have 4 tabs in my program and each tab has its own table. In order to cut and paste to the correct table (wi

Re: [PyQt] subtle bug in PyQt in combination with Python garbage collector

2011-08-24 Thread Adrian Buehlmann
On 2011-08-13 18:05, Kovid Goyal wrote: > This bug has been present for a very long time. As a workaround in my > projects, > I disable the automatic garbage collector and run garbage collection manually > in the GUI thread via QTimer. Here's the code to do that: > > class GarbageCollector(QObje

Re: [PyQt] pyqt behavior change

2011-08-24 Thread Ingrid Dahl-Olsen
Hi, Sorry for commenting on a post this old, but I've only just run into this change as I'm using PyQt in maya at work, and so have been stuck with using 4.7.2 until very recently when it was bumped up to 4.8.4. Just out of curiosity, is it really wrong to expect an instance of a widget like

[PyQt] Sourcing libs across network?

2011-08-24 Thread Christopher Evans
Anyone sourcing the pyqt libs from across a network (windows)? We have some weird errors, mainly when loading a UIC via the UIC module. # Error: : invalid syntax (, line 31) # Traceback (most recent call last): # File "", line 1, in # File "\\fs1\TECHART\Tools\CryMayaTools\CryAnimation\retarget