My system Kubuntu 11.10
PyQt 4.8.5 from default repositories.
Qt 4.7.4 from default repositories.
In QMenuBar no functions cornerWidget setCornerWidget
Why?
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/li
I upgrade my Kubuntu to 10.10.
(libqtcore4 v4.7.0-0ubuntu4, python-sip v4.10.5-0ubuntu1, python-qt4
v4.7.4-0ubuntu1)
And I receive TypeError for my projects
Sample code (file slots.py):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtCore, QtGui
class TableView(QtGu
Alexandr N Zamaraev wrote:
P.S. My Environment:
PyQt 4.5.4
Sorry. I forget.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
I use several versions and builds of Qt.
Switch them via symlink.
Bat after configure PyQt some Qt path in Makefile has mixin slash:
@if not exist C:/Lang/qt/qt4.5.2\qsci\api\python mkdir
C:/Lang/qt/qt4.5.2\qsci\api\python
copy /y PyQt4.api C:/Lang/qt/qt4.5.2\qsci\api\python\PyQt4.api
Y
Snippet:
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4 import QtCore
>>> QtCore.QVariant(1) == QtCore.QVariant(1)
True
>>> QtCore.QVariant(int) == QtCore.QVariant(int)
Fa
My Environment:
Os Windows Vista Home Basic Ru + sp1
g++ (GCC) 3.4.5 (mingw-vista special r3)
Qt 4.5.1 (self build)
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
Error log:
C:\Lang\qt\qscintilla-2.4>mingw32-make
cd Qt4 && qmake qscintilla.pro
mingw32-make
[code]
from PyQt4 import QtCore
import datetime
def show(d, QtType):
print 'pytype:', d
v = QtCore.QVariant(d)
print 'from variant:', str(QtCore.QVariant(d).toString())
print 'from qttype:', str(QtCore.QVariant(QtType(d)).toString())
show(datetime.date.today(), QtCore.QDate)
print
show(d
[code=python]
from PyQt4 import QtCore, QtGui
class EditorFactory(QtGui.QItemEditorFactory):
pass
def createTv():
tv = QtGui.QTableView()
model = QtGui.QStandardItemModel(4, 2, tv)
tv.setModel(model)
delegate = QtGui.QStyledItemDelegate(tv)
delegate.setItemEditorFactory(EditorFactor
Alexandr N Zamaraev wrote:
I reproduce this with
sip-4.8-snapshot-20090424 (self build)
PyQt-win-gpl-4.5-snapshot-20090328 (self build)
Call Garbage Collector after the closing of the dialogue does not
produce any effect.
Sorry.
I found. This is my reference cycle
Alexandr N Zamaraev wrote:
Os Windows Vista Home Ru + sp1
g++ (GCC) 3.4.5 (mingw-vista special r3)
Qt 4.5 (self build)
sip-4.7.9 (self build)
PyQt-win-gpl-4.4.4.zip (self build)
I reproduce this with
sip-4.8-snapshot-20090424 (self build)
PyQt-win-gpl-4.5-snapshot-20090328 (self build)
Call
Looks like I got very simplified code.
The real hierarchy for the Data and Model looks like this (may be more
levels):
[code]
class BaseData(QObject):
def __init__(self):
super(BaseData, self).__init__()
...
class FinalData(BaseData):
...
class BaseModel(QAbstractItemModel):
def _
Os Windows Vista Home Ru + sp1
g++ (GCC) 3.4.5 (mingw-vista special r3)
Qt 4.5 (self build)
sip-4.7.9 (self build)
PyQt-win-gpl-4.4.4.zip (self build)
I was unable to allocate a minimum example. Here is pseudocode situations:
[code]
class BaseData(QObject):
def save(self, obj):
self.emit(Q
Phil Thompson wrote:
How do you know that connect works? I don't think it is being called.
You can only define signals in sub-classes of QObject, not in mixins.
I translate a great application PyQt 4.4 -> 4.5 and do not always have
to monitor the situation, if the signal is initiated in the mixi
Os Windows Vista Home Ru + sp1
g++ (GCC) 3.4.5 (mingw-vista special r3)
Qt 4.5 (self build)
sip-4.8-snapshot-20090409 (self build)
PyQt-win-gpl-4.5-snapshot-20090412.zip (self build)
I was unable to allocate a minimum example. Here is pseudocode situations:
[code]
class A(object):
signal = QtC
Os Windows Vista Home Ru + sp1
g++ (GCC) 3.4.5 (mingw-vista special r3)
Qt 4.5 (self build)
sip-4.8-snapshot-20090409 (self build)
PyQt-win-gpl-4.5-snapshot-20090411.zip (self build)
P.S. We found this in the code code:
def connectWidget(self, widget):
widget.signalA.connect(self.signalA)
Phil Thompson wrote:
def __connectAll(self):
for dm in (self.__phys, self.__jur, self.__bus):
dm.data_adds.connect(self.data_adds.emit)
I don't understand what you are trying to do in the last line.
It may well be more intuitive:
[code]
class DataLink(QtCore.QObject):
data_add
I try port my applications to PyQt 4.5
And I recive TypeError:
[code]
Traceback (most recent call last):
...
File
"C:\Lang\Projects\Promsoft\mun_ob\doc_circ\src\links\DataRightOwner.py",
line 48, in __init__
self.__connectAll()
File
"C:\Lang\Projects\Promsoft\mun_ob\doc_circ\src\links
Code for reproduce:
[code=python]
from PyQt4 import QtGui
sm = QtGui.QSortFilterProxyModel()
sm.modelReset.conncet(lambda: None)
[/code]
Traceback (most recent call last):
File "C:\Lang\test\python\PyQtSignalBug\QtSortProxy.py", line 4, in
sm.modelReset.conncet(lambda: None)
AttributeErr
Os Windows Vista Home Ru + sp1
g++ (GCC) 3.4.5 (mingw-vista special r3)
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
sip-4.8-snapshot-20090401
PyQt-win-gpl-4.5-snapshot-20090403
[console snipped]
C:/Lang/qt/PyQt-4.5>mingw32-make
...
mingw32-make[1]: Ente
>s = QtCore.QStringList(set(['1', '2', '3']))
This line crach python interpreter
But
>s = QtCore.QStringList(list(set(['1', '2', '3'])))
work ok.
My Environment:
WinVista Home Basic Ru + sp1
Python 2.5.2
sip 4.7.7 (from source, build gcc mingw 3.4.5)
Qt 4.4.1 (from source, build gcc mingw 3.4.5)
My Environment:
WinVista Home Basic Ru + sp1
Python 2.5.2
sip 4.7.7 (from source, build gcc mingw 3.4.5)
Qt 4.4.1 (from source, build gcc mingw 3.4.5)
PyQt 4.4.3 (from source, build gcc mingw 3.4.5)
Code snap:
>>> from datetime import datetime
>>> from PyQt4 import QtCore
>>> u'%s' % datetime.tod
If I try install sip or PyQt with MinGW + MSYS, I recive error:
sip>mingw32-make install
mingw32-make.EXE[1]: Entering directory `D:/Lang/qt/sip/sipgen'
makefile:29: warning: overriding commands for target `.c.o'
makefile:26: warning: ignoring old commands for target `.c.o'
/bin/sh: -c: line 1: s
Why do not use QSignalMapper?
Also simple wrote "multy" decorator.
Example:
@multyNamedSignature([
'on_pushButton1_clicked',
'on_pushButton2_clicked'])
@QtCore.pyqtSignature('')
def on_pushButton_clicked(self):
print "Hi Man!"
Source:
import sys
from PyQt4 import QtCore, QtGu
23 matches
Mail list logo