transformation will influence the item's children.
-- TP
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Hello,
I currently use the API 1, and use the isNull() method of QVariant to detect
a Null QVariant. This is necessary to detect a NULL value in a database.
It seems there is no equivalent in API2 of PyQt. None is used to model an
invalid QVariant. But how to model a Null QVariant?
Phil Thompson wrote:
The short answer is that you can't. However...
QVariant::isNull() typically delegates to the enclosed data's isNull()
method (eg. QString::isNull()). So your example for API v1 will also work
for API v2.
It gets a bit more complicated if you are also using the
Phil Thompson wrote:
API v1 will be supported until PyQt5 or Python v4.
Is it contractual? Why Python v4? It seems to me that nobody knows when
Python v4 will appear.
Anyway, it seems to be a problem that API2 does not support NULL, even if it
corresponds to side cases (as mine).
Thanks,
Erik Janssens wrote:
you could just access sql through python instead of through qt,
NULL would then correspond to None
Thanks.
Yes, it is possible to use for example the sqlite3 module, but there are
facilities related to the GUI, available when using Qt: QSqlTableModel,
On Wed, Nov 24, 2010 at 6:26 AM, Арсений Т sen...@gmail.com wrote:
Hello.
Ctrl+F4 does not work in examples\mainwindows\mdi\mdi.pyw:
QAction::eventFilter: Ambiguous shortcut overload: Ctrl+F4
(Python 2.5, windows XP, latest PyQt4)
___
If I am right, none of the properties of QTextEdit is virtual. So none can
be reimplemented... It is not easy to change the default behavior in these
conditions.
Finally I have found a solution: using QPlainTextEdit instead of QTextEdit:
the default property is plainText, not html as in
Hello,
I currently use QDataWidgetMapper with a custom property name:
self.mapper.addMapping( widget, index, propertyName )
Now let us look at the private method populate() of
src/gui/itemviews/qdatawidgetmapper.cpp (Qt source code):
//
void QDataWidgetMapperPrivate::populate(WidgetMapper
Phil Thompson wrote:
setProperty() isn't virtual so you can't reimplement it in Python.
Thanks a lot.
And neither can I reimplement it in C++, if I am right.
I am not very familiar to C++ programming, now I know what a virtual
function is!
Julien
On Wed, Oct 27, 2010 at 2:39 PM, Hans-Peter Jansen h...@urpla.net wrote:
On Tuesday 19 October 2010, 07:41:55 TP wrote:
I'm trying to write my first PyQt program. I eventually plan on
creating an open-source PyQt app that explores the use of various
image processing operations (using
On Fri, Oct 22, 2010 at 9:53 AM, Phil Thompson
p...@riverbankcomputing.com wrote:
PyQt v4.8 and SIP v4.11.2 have been released and are available from the
usual places.
The highlight of the release is full support for Qt v4.7.
The Windows installers now contain a custom build of Qt using the
I'm trying to write my first PyQt program. I eventually plan on creating
an open-source PyQt app that explores the use of various image processing
operations (using the Leptonica C library http://www.leptonica.com as
the underlying image processing engine).
One of my initial goals is to be able
On Fri, Oct 15, 2010 at 1:12 AM, Phil Thompson
p...@riverbankcomputing.com wrote:
On Thu, 14 Oct 2010 15:37:02 -0700, TP wing...@gmail.com wrote:
QGraphicsScene's changed signal is documented as:
void changed (const QListQRectF)
The Qt Utility classes and their Python equivalents section
QGraphicsScene's changed signal is documented as:
void changed (const QListQRectF)
The Qt Utility classes and their Python equivalents section of
Chapter 10 Qt Class Hierarchy of GUI Programming with Python: QT
Edition (from http://www.commandprompt.com/community/pyqt/x3738) says:
You can
I am trying to implement an image processing application that will
have multiple image viewers created with a subclass of QGraphicsView.
I need to be able to optionally keep all the image viewers in sync
with respect to zoom and position as the user clicks on the
scrollbars, uses the scroll wheel
On Mon, Oct 11, 2010 at 5:18 AM, TP wing...@gmail.com wrote:
I am trying to implement an image processing application that will
have multiple image viewers created with a subclass of QGraphicsView.
I need to be able to optionally keep all the image viewers in sync
with respect to zoom
On Tue, Aug 17, 2010 at 12:00 PM, Bernard Van Der Stichele
bernard_vanderstich...@otpp.com wrote:
Hello all,
I'm looking for some advice as to the best way of implementing an MDI - like
application which is modular.
i.e. I want to have a MainWindow host with a menu which dynamically loads a
I'm using Windows XP, Python 2.6.4, and PyQt 4.7.1.
While trying out the example
C:\Python26\Lib\site-packages\PyQt4\examples\widgets\imageviewer.pyw,
I notice that the more I zoom into an 1553x2653 BW PNG image, the
longer it takes to display. This becomes unacceptably long (on the
order of a
In http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg18113.html
Phil Thompson was asking about the non-const QImage constructor:
QImage(uchar *data, int width, int height, int bytesPerLine, Format format);
and suggested implementing it using void * as the first argument.
However, when
Victor Noagbodji wrote:
Hello Julien,
to fix it you have to set the contents margins on the layout object.
so your code should look like this:
qh = QtGui.QHBoxLayout( self )
qh.setContentsMargins(0, 0, 0, 0)
self.qlabel = QtGui.QLabel()
Hi,
Try the example at the end of this message: it is a table with editable
items. This is a modified version of the example spinboxdelegate.py of
the PyQt examples (itemviews section). When the user double-clicks on an
item, a LabelAndSpinBox instance is created as delegate. The problem is
that
Andreas Pakulat wrote:
Thats not the way to use QDockWidget, please look at the dockwidgets
example and the API documentation to find out how to use that properly.
The dockwidgets example uses setWidget. Why has QDockWidget a setLayout
class if we cannot use it? Qt documentation seems to say
TP wrote:
The dockwidgets example uses setWidget. Why has QDockWidget a setLayout
class if we cannot use it?
Excuse me: substitute a setLayout class by a setLayout method,
obviously!
Sorry
--
python -c print ''.join([chr(154 - ord(c)) for c in '*9(9(18%.\
91+,\'Z4(55l4('])
When
Hi everybody,
I have subclassed QComboBox. For example I have changed paintEvent to get a
customized look. It works perfectly. But I have also to change the behavior
of the mouse wheel on the combo box. For this, I would like to subclass the
function wheelEvent of QComboBox (see below its C++
Hi,
Try the small script below. I cannot manage to do setLayout for a
QDockWidget: QDockWidget.setWidget() works correctly, but not
QDockwidget.setLayout(), I obtain the following message:
QWidget::setLayout: Attempting to set QLayout on QDockWidget , which
already has a layout
So, with some
Hi everybody,
Qt Assistant says that:
Disconnect everything connected to an object's signals:
disconnect(myObject, 0, 0, 0)
0 may be used as a wildcard, meaning any signal, any receiving object,
or any slot in the receiving object, respectively.
But if I do:
disconnect(
Hi everybody,
It seems that it is impossible to keep an icon checked and make it disabled
with the styles other than the Windows one. Try the following example
which uses the Plastique style. Check the blue icon, and then check on
the modif button. The blue icon becomes unchecked on my machine,
Hi everybody,
I have detected a strange behavior on Linux with QSpinBox (try the code
example below): when the valueChanged( int ) signal is connected to a
function that takes some time to execute, sometimes the up and down
clickable buttons of the QSpinBox increment and decrement its value by 2
Mads Ipsen wrote:
Yes, this is correct, and I posted a similar question regarding this
behavior observed under Linux. The most peculiar thing, is that it works
correctly if you select the QLineEdit of the QSpinBox and press the up
and down arrows on the keyboard.
The problem is, however,
Hi everybody,
I use model/view/delegate architecture of Qt.
I have a problem of slowness in a small example given below. Run the script
from a terminal to see all standard output.
Try to play with the tree: expand items, click on cells, etc. You will find
that the function data is called all the
Andreas Pakulat wrote:
The reason you get a segfault when using a proxy is quite simply that
you're trying to access something which doesn't exist. The index you get
in cellClicked is not an index of your custom model, its an index of the
proxy model, which doesn't have an internal pointer
Andreas Pakulat a écrit :
The reason you get a segfault when using a proxy is quite simply that
you're trying to access something which doesn't exist. The index you get
in cellClicked is not an index of your custom model, its an index of the
proxy model, which doesn't have an internal pointer
TP a écrit :
Could this be a bug in PyQt?
Has someone tried my script to check if the segfault is reproducible?
Julien
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
TP wrote:
The problem seems to be related to qmodelindex, the segfault appears when
taking internalPointer method.
I have to add that without the proxy (by using directly the model without
the proxy), it does not yield any segfault.
Could this be a bug in PyQt?
Thanks
--
python -c print
Hi everybody,
Here you will find a small (170 lines) self-contained Python script.
http://paratribulations.free.fr/help/python/simpleproxy.py
I use a model, and a proxy (that does nothing, but in a more complicated
version, not given here, it works perfectly). The view is a QTreeView.
The
Hi everybody,
To color a QDialog (for example), I can do:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
app = QApplication( sys.argv )
dialog = QDialog( )
dialog.palette().background().setColor(Qt.blue) # @
dialog.show()
app.exec_()
But if I replace the line @ by:
TP wrote:
So I have tried to play with a lot of methods provided by QComboBox,
without success (for example, currentText, setItemText, etc.).
For those that are interested, or Qt beginners like me: by examining Qt C++
source code, I have finally found a solution: I have specialized paintEvent
TP wrote:
http://paratribulations.free.fr/help/python/integerdelegate_question.py
Has someone tried my example?
Julien
--
python -c print ''.join([chr(154 - ord(c)) for c in '*9(9(18%.\
91+,\'Z4(55l4('])
When a distinguished but elderly scientist states that something is
possible, he
Hi everybody,
I want to specialize a QComboBox. I take a dummy example: if there are the
following choices in the QListView provided by the QComboBox:
toto
titi
tutu
I want that if the user chooses toto, to display toto has been chosen in
the QComboBox.
If the user chooses titi, then I want to
Hi everybody,
I have adapted the tree example using model/view/delegate proposed in the
book of Summerfield (p.492-504): I obtain a custom tree widget.
In my custom tree widget, I want to be able to add children by setting the
number of children of a parent; this is done with a delegate using a
40 matches
Mail list logo