I'm getting some strange error messages every time I close my PyQt app, but
not in consistent places.
Errors such as these:
*pyqtSignal must be bound to a QObject, not 'ImageLoader'*
(ImageLoader is a subclass of QObject, and I make sure to call the super's
constructor in the __init__)
*QObject
I've run into what looks to be a bug with drag/drop and TreeViews on OSX,
which appears to be specific to PyQt, as the same issue does goes away when
running equivalent C++ code against the same version of Qt.
When dragging from one TreeView to another, as soon as one of the
QDragMoveEvents gets i
Is there any way to have a class inherit from multiple classes that emit
signals? I know that PyQt4 doesn't support inheriting from one than one
QObject class, so I've got one of the superclasses declared as a subclass
QObject and the other as a subclass of object. However, I'm not able to
define s
Hi, what is the proper way to connect a signal to another signal using the
new-style signal/slot syntax? I've been doing it like this:
myObj1.mySignal.connect(lambda arg1, arg2: myObj2.mySignal.emit(arg1,arg2))
but is there a way to do it without using a lambda function?
Thanks
_
Is there any way to catch a segfault caused by Qt (for example, to log it to
a file, etc)? I've tried installing a handler for the SIGSEGV signal, but it
doesn't seem to work when a segfault occurs within PyQt. Example:
#
# install a signal handler
import signal
def handler(si
I've tested the following bit of code under these 2 setups:
1. Mac OSX 10.6.2 Intel
Python 2.6.5
Qt 4.6.2
PyQt 4.7.2
2. GNU/Linux x64 Fedora 8
Python 2.6.2
Qt 4.6.2
PyQt 4.7
The code runs fine on the Linux setup, but results in a segfault on OSX.
Interestingly, if I declare the
I'm trying to format Python datetime objects into strings using QLocale, but
it seems that under SIP API v2, the time information is lost? Are datetime
objects being interpreted as QDate rather than QDateTime? Here's an example:
#
# API v1
#
from PyQt4.QtCore import
When using v2 of the API for QString and QVariant, if you write a boolean
value to a QSettings file and then read the value back in from a different
session, it comes back as a unicode string. Example:
##
# write out the qsettings file
##
import sip
sip.setapi('QVar
I'm trying to get the color value for the table grid by making the following
call:
QtGui.QApplication.style().styleHint(QtGui.QStyle.SH_Table_GridLineColor,
option, self)
but this returns -3684409, which is not a valid qRgb (throws an error when
constructing a QColor from it). Looking at the inte
Aha! Thanks
On Wed, Mar 10, 2010 at 12:52 PM, Phil Thompson wrote:
> On Wed, 10 Mar 2010 11:58:48 +0000, Jugdish wrote:
> > How do you pass an arbitrary python object in/out of a QDataStream when
> you
> > have the SIP API set to version 2 for QVariants?
> >
> >&g
How do you pass an arbitrary python object in/out of a QDataStream when you
have the SIP API set to version 2 for QVariants?
>>> import sip
>>> sip.setapi('QVariant', 2)
>>> from PyQt4 import QtCore
>>> data = QtCore.QByteArray()
>>> outstream = QtCore.QDataStream(data, QtCore.QIODevice.WriteOnly)
Is there any way to compile SIP so that it uses v2 of its API for things
like QString, QVariant, QDate, etc.?
I would rather not do:
import sip
sip.setapi('QString', 2)
at runtime because I can not always guarantee that PyQt4 hasn't been
imported before I am able to make the above call. Instead,
How do I convert a QStyleOptionViewItem into a QStyleOptionViewItemV4? Qt
has the qstyleoption_cast() method, but no such method exists in PyQt4.
I have my own subclass of QStyledItemDelegate and have overridden the
initStyleOption() method so that I can provide my own foreground/background
colors
rk if BaseView had no base
class.
Any ideas of a better way to achieve this without duplicating code between
the 2 views?
Thanks
On Mon, Feb 22, 2010 at 8:45 PM, Andreas Pakulat wrote:
> On 22.02.10 19:45:31, Jugdish wrote:
> > I have my own subclasses of QTreeView and QTableView, called MyT
I have my own subclasses of QTreeView and QTableView, called MyTableView and
MyTreeView. There is a lot of code that is common between my 2 classes, so
to avoid having tons of duplicate code, I was thinking of having a base
class derived from QAbstractItemView that they both derive from. This
resul
If you run this, you see that the label with wordWrap enabled has a larger
top and bottom margin, and the sizeHint returned is 112x33 whereas the one
without wordWrap has a sizeHint of 169x18.
Any ideas why this is and how to avoid it?
Thanks,
-Jugdish
__
Bug report filed here:
http://bugreports.qt.nokia.com/browse/QTBUG-6355
On Fri, Nov 27, 2009 at 8:50 PM, Hans-Peter Jansen wrote:
> On Friday 27 November 2009, 19:34:31 Jugdish wrote:
> > For some reason if I set the windowFlag "Popup" on a QListWidget, the
> > widget
For some reason if I set the windowFlag "Popup" on a QListWidget, the widget
takes modal focus and it is impossible to give focus back to any widget. In
fact, my entire system becomes unresponsive. Only the QListWidget responds
to input, and I have no way of killing the process. Here is a very stri
t() method, so I should be
seeing my print statement on every paint event.
Any idea what I'm doing wrong?
Thanks,
-Jugdish
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Is there any way to make the pixmap on a QDrag object be semi-transparent?
Here is the code I've got right now:
def startDrag(self, supportedActions):
drag = QDrag(self)
pixmap = QPixmap("/path/to/my/image.png")
alphaChannel = QPixmap
I'd like to use QStackedLayout to put some QLineEdit widgets in, with only
one visible at a time. For some reason, whenever I put a widget inside a
QStackedLayout, it displays much taller than it normally would. Below is a
small example to demonstrate this -- compare the height of the QLineEdit
out
21 matches
Mail list logo