Re: [PyQt] Qt4/Qt5 incompatible results of QTableWidget.selectedItems()?

2013-07-02 Thread Andreas Pakulat
Hi, Qt makes no guarantee on the order of returned items, it merely guarantee's that all items that are selected are returned in a list. There's no incompatibility, just a change in a behaviour that is not explicitly defined. Andreas On Tue, Jul 2, 2013 at 6:31 PM, T.N.T. t...@banza.net wrote:

Re: [PyQt] QGraphicsView very slow under Linux and Mac OS X

2013-04-03 Thread Andreas Pakulat
Hi, On Wed, Apr 3, 2013 at 2:15 PM, Clemens Brunner clemens.brun...@tugraz.atwrote: Hi, I've also posted this question as a bug report at qt-project.org ( https://bugreports.qt-project.org/browse/PYSIDE-151), but this is also a PyQt issue. QGraphicsView is apparently very slow under Linux

Re: [PyQt] QGraphicsView very slow under Linux and Mac OS X

2013-04-03 Thread Andreas Pakulat
Hi On Wed, Apr 3, 2013 at 3:50 PM, Clemens Brunner clemens.brun...@tugraz.atwrote: On 04/03/2013 03:24 PM, Andreas Pakulat wrote: That being said, here with Qt4.8 even a full-screen window will not cause a significant slowdown, except during the resize phase. Once the resize is done

Re: [PyQt] PyQt4 original example “dbus” bugged

2013-04-03 Thread Andreas Pakulat
Hi, On Wed, Apr 3, 2013 at 4:16 PM, Pietro Moras studio...@hotmail.com wrote: [QtDBus] it's not supported on Windows. Thank you Phil for this info: bug “dissolved”. Just a mild perplexity, as the package: “PyQt-Py3.3-x86-gpl-4.9.6-1.exe Windows 32 bit installer” I've downloaded

Re: [PyQt] headless browsing via PyQT4

2013-02-17 Thread Andreas Pakulat
Hi, On Sun, Feb 17, 2013 at 1:27 AM, Jiangcheng Bao jbao...@gmail.com wrote: I am trying to achieve headless browsing via QWebView or QWebPage, but looks like the application would require a X server to connect to, even if I don't call the .show() method. The sample code at

Re: [PyQt] Help tracking down intermittent segfault using QGraphicsItem

2013-01-05 Thread Andreas Pakulat
Hi, On Sat, Jan 5, 2013 at 4:09 PM, Lee Harr miss...@hotmail.com wrote: I tried pynguin-0.12.zip on Windows7, python 2.7, PyQt 4.8.4 32bit, and I could run go() many times without any crashes or warnings. However, there appears to be no tournament function. Thanks for taking your time on

Re: [PyQt] Help tracking down intermittent segfault using QGraphicsItem

2013-01-05 Thread Andreas Pakulat
Hi, Am Samstag, 5. Januar 2013 schrieb : On 05.01.2013, 16:50:29 Andreas Pakulat wrote: [...] Often a segfault is caused by using a pointer (in C++) which points to a memory location thats not valid anymore, for example because the object has been deleted already. In the context of PyQt

Re: [PyQt] QtCore.QAbstractItemModel.beginMoveRows missing in pyqt 4.7.3?

2012-11-27 Thread Andreas Pakulat
Hi, On Tue, Nov 27, 2012 at 9:39 PM, Jake Richards bla...@gmail.com wrote: Hello: At work, we've got pyqt 4.7.3 installed on our linux boxes. While trying to subclass a QAbstractItemModel, I've found that it doesn't seem to have a beginMoveRows or endMoveRows. Here is some terminal

Re: [PyQt] Using drag+drop in a QComboBox

2012-10-30 Thread Andreas Pakulat
Hi, On Tue, Oct 30, 2012 at 5:50 PM, Chris Beaumont beaum...@hawaii.edu wrote: I'm having some trouble getting drag+drop to work properly within a QComboBox widget. I've posted to SO: http://stackoverflow.com/questions/13141143/pyqt4-items-disappear-when-using-drag-and-drop-with-qcombobox I

Re: [PyQt] Using drag+drop in a QComboBox

2012-10-30 Thread Andreas Pakulat
Hi, On Tue, Oct 30, 2012 at 7:54 PM, Chris Beaumont beaum...@hawaii.edu wrote: Fair enough. My application is a window that displays one of several images for scientific image analysis. A combo box selects which image is displayed. It's a nice feature that you can blink back and forth between

Re: [PyQt] qtreeview vs qtreewidget selection model?

2012-10-04 Thread Andreas Pakulat
Hi, On Fri, Oct 5, 2012 at 12:20 AM, Jordan Olson jorxs...@gmail.com wrote: So here's what's happening. I'm implementing a custom QTreeView model, and though I have it working pretty well, the one little peeve I haven't figured out is the way it handles selection- --any default

Re: [PyQt] Item data on QTreeView

2012-07-09 Thread Andreas Pakulat
Hi, On Mon, Jul 9, 2012 at 12:02 AM, Diego diego.no.s...@gmail.com wrote: Hi, I have a QTreeView widget that displays one Message per row. It also has several columns, each of which displays one Message's attribute. The tree's model is a QStandardItemModel that I populate this way: for m

Re: [PyQt] PyQt Phonon video player memory leak

2012-05-08 Thread Andreas Pakulat
Hi, On Mon, May 7, 2012 at 7:59 PM, Judd Simantov judd...@gmail.com wrote: Hey, I'm creating an instance of Phonon.VideoPlayer in my UI and every time I instantiate the player it allocates about 40mb or memory I can't seem to get back. This is the call: player =

Re: [PyQt] PyQt Phonon video player memory leak

2012-05-08 Thread Andreas Pakulat
Hi, please keep the discussion on the list. On Tue, May 8, 2012 at 11:29 AM, judd...@gmail.com wrote: Each instance created allocates 40mb (I'm just looking at the task manager) and eventually the app gets to like 2 gigs and crashes. The task-manager is not necessarily a good leak-detector.

Re: [PyQt] QGraphicsView item select

2012-04-11 Thread Andreas Pakulat
On 10.04.12 20:05:19, Alfredo Junior wrote: Thank you for your help. But I can't make something like that. In my example only tableWidget works: class Init(QtGui.QMainWindow):     def __init__(self):         super(Init, self).__init__()         self.initUI()     def initUI(self):    

Re: [PyQt] QGraphicsView item select

2012-04-11 Thread Andreas Pakulat
On 11.04.12 06:02:09, Alfredo Junior wrote: OK. This is a functional example: #!/usr/bin/python # -*- coding: utf-8 -*- import sys from PyQt4.QtCore import * from PyQt4.QtGui import * def itemSelected(self):     print Selection changed      app = QApplication(sys.argv) grview =

Re: [PyQt] QGraphicsView item select

2012-04-11 Thread Andreas Pakulat
On 11.04.12 16:13:09, Vincent Vande Vyvre wrote: You'll be more easy if you subclass your QGraphicsPixmapItem. Example: the item can return his index, or name or identifier, etc. This example will still not emit a selection-change signal so won't help the OP at all. No idea what you're trying

Re: [PyQt] QGraphicsView item select

2012-04-07 Thread Andreas Pakulat
On 06.04.12 11:32:34, Alfredo Junior wrote: Hi people,  I am writing a PyQt application. There is a sqlite database where I store data collected from the mame games(mamedev.org). I created a QGraphicsView with the screens of the games. Also created a QTableWidget with information about

Re: [PyQt] Designer source

2012-03-09 Thread Andreas Pakulat
On 09.03.12 09:38:06, Hans-Peter Jansen wrote: Am Thursday 08 March 2012 23:08:09 schrieb Andreas Pakulat: On 08.03.12 19:42:39, Detlev Offenbach wrote: Am Donnerstag, 8. März 2012, 09:49:41 schrieb Andreas Pakulat: On 08.03.12 09:35:51, Andreas Pakulat wrote: On 07.03.12 16:14:18

Re: [PyQt] Designer source

2012-03-08 Thread Andreas Pakulat
On 07.03.12 16:14:18, JPolk wrote: ...'cause it would make it easier for me to merge Designer with Maya ;-) Write Maya in C++ ;P Andreas ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Designer source

2012-03-08 Thread Andreas Pakulat
On 08.03.12 09:35:51, Andreas Pakulat wrote: On 07.03.12 16:14:18, JPolk wrote: ...'cause it would make it easier for me to merge Designer with Maya ;-) Write Maya in C++ ;P Hmm, on a more serious note, you won't get around writing C++. AFAIK the public API of the QtDesigner library

Re: [PyQt] Designer source

2012-03-08 Thread Andreas Pakulat
On 08.03.12 19:42:39, Detlev Offenbach wrote: Am Donnerstag, 8. März 2012, 09:49:41 schrieb Andreas Pakulat: On 08.03.12 09:35:51, Andreas Pakulat wrote: On 07.03.12 16:14:18, JPolk wrote: ...'cause it would make it easier for me to merge Designer with Maya ;-) Write Maya in C

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Andreas Pakulat
On 07.03.12 09:37:38, Mads Ipsen wrote: Hi, I have a general question about how to unit test PyQt applications using the Python unittest moudle. I have attached a few examples. If you have time to take a look and comment, it would be great. The first module, Foo.py, defines a simple

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Andreas Pakulat
On 07.03.12 15:42:34, Mads Ipsen wrote: OK, I agree, the snippets I provided were not nice, and I apologize for that. But suppose that the constructor in your class starts a thread that generates say an icon for a QStandardItem. Then you want to make sure that the thread has finished before

Re: [PyQt] Designer source

2012-03-07 Thread Andreas Pakulat
On 07.03.12 13:42:12, JPolk wrote: ...I think I know the answer to this already, but just to be sure,... Does Designer only exist as a C or C++ source program?... Yes. Meaning, has anybody ported this over into the Python language? Why? Whats the benefit of doing that? Andreas

Re: [PyQt] QThread not forcibly terminating as expected

2012-03-06 Thread Andreas Pakulat
On 06.03.12 11:10:19, Brian Knudson wrote: Message: 4 Date: Tue, 6 Mar 2012 08:54:09 +0100 From: Andreas Pakulat ap...@gmx.de To: pyqt@riverbankcomputing.com Subject: Re: [PyQt] QThread not forcibly terminating as expected Message-ID: 20120306075409.GA30346@barmbek Content-Type

Re: [PyQt] QThread not forcibly terminating as expected

2012-03-05 Thread Andreas Pakulat
On 05.03.12 13:35:02, Brian Knudson wrote: On Mar 3, 2012, at 4:00 AM, pyqt-requ...@riverbankcomputing.com wrote: Message: 1 Date: Sat, 3 Mar 2012 10:17:39 +0100 From: Andreas Pakulat ap...@gmx.de To: pyqt@riverbankcomputing.com Subject: Re: [PyQt] QThread not forcibly terminating

Re: [PyQt] QThread not forcibly terminating as expected

2012-03-03 Thread Andreas Pakulat
On 02.03.12 19:59:50, Brian Knudson wrote: Hello all, Apologies for the lengthy mail. The last paragraph is the important one, but everything else helps explain. I'm writing a PyQt interface for a networking system (3rd party application) via its API. The 3rd party API calls don't

Re: [PyQt] Can DockWidgets be docked onto anything else except MainWindows?

2012-02-01 Thread Andreas Pakulat
On 01.02.12 17:37:53, JPolk wrote: Can DockWidgets be docked onto anything else except MainWindows ? Supposed you have either a layout or a widget that's mid-page in a window and want to dock/undock from that layout/widget and not the MainWindow... Doesn't look to be possible,...Can

Re: [PyQt] Incompatibility between PyQt compiled with Qt 4.7 and 4.8

2012-01-28 Thread Andreas Pakulat
On 28.01.12 13:01:28, Scott Kitterman wrote: Luca Beltrame ei...@heavensinferno.net wrote: In data sabato 28 gennaio 2012 12:13:41, Scott Kitterman ha scritto: but leaves open the question of what caused the incompatiblity and what other packages might be affected. As far as I

Re: [PyQt] QTableView in Editingstate

2012-01-20 Thread Andreas Pakulat
On 20.01.12 11:15:17, Daniel Benden wrote: Hi, I hope to get some help with the following problem. First a little situation sketch: I have a QTableView with a custom model (subclass from QAbstractTableModel) and a custom itemdelegate(subclassed from QItemDelegate). The QItemDelegate

Re: [PyQt] QWebkit: saving/caching user input

2012-01-18 Thread Andreas Pakulat
On 17.01.12 18:24:50, James Polk wrote: okay, Back at the front,... Let's say we use QWebKit to read an HTML file containing a javascript textField...like so: htmlbody p     form name=thisForm     tr     tdName:/td tdinput type=text name=name id=nameId value=John/td

Re: [PyQt] Bug in QWebKit?...

2012-01-13 Thread Andreas Pakulat
On 13.01.12 14:23:02, Kovid Goyal wrote: On Fri, Jan 13, 2012 at 09:34:42AM +0100, Andreas Pakulat wrote: Well, determining coordinates and height/width for elements is a completely different story than fetching a static attribute from a static element in a static page. The point

Re: [PyQt] PyQt in embedded python (C++/Qt Application)

2012-01-13 Thread Andreas Pakulat
On 13.01.12 15:09:06, Marc Gronle wrote: Hello everybody, I am developing a C++/Qt Application, where we integrated python as scripting engine. I would like to offer the possibility to write PyQt-Scripts in order to generate user-defined interfaces. In the present case, the python

Re: [PyQt] Bug in QWebKit?...

2012-01-12 Thread Andreas Pakulat
On 12.01.12 16:28:17, James Polk wrote: Greetings All, We've uncovered what appears to be a very unfortunate bug in QWebKit... If it is indeed a bug, we can't tell _where_ the bug is originating from.. ..is it a Qt-bug? PyQt? We're on Qt 4.7,..could it be fixed in 4.8? (Env info below)

Re: [PyQt] QtSql connection fail where psycopg2 success?

2012-01-11 Thread Andreas Pakulat
On 11.01.12 16:56:38, Panupat Chongstitwattana wrote: I'm using the same ip address, same user name and same password to make connection. What could cause QtSqlDatabase to fail connection where psycopg2 has no problem? Am I missing something? Do both of them connect to the same port by

Re: [PyQt] QtSql connection fail where psycopg2 success?

2012-01-11 Thread Andreas Pakulat
On 11.01.12 18:03:52, Panupat Chongstitwattana wrote: Where is Qt's plugin folder? I can only find this Whereever you installed Qt. If you took the PyQt4 windows binary package, then I don't know :| C:\Python26\Lib\site-packages\PyQt4\plugins\sqldrivers It has 4 files in it. qsqlite4.dll

Re: [PyQt] QtSql connection fail where psycopg2 success?

2012-01-11 Thread Andreas Pakulat
On 11.01.12 18:55:43, Panupat Chongstitwattana wrote: Thanks Andreas. You're right I used windows binary installer. I don't seem to have the postgresql.dll anywhere, nor can I find the Qt installation folder : / Sorry, should've mentioned that the filename was made up, no idea how its called

Re: [PyQt] Override QStyledItemDelegate.initStyleOption not working?

2012-01-11 Thread Andreas Pakulat
On 11.01.12 14:47:25, Phil Thompson wrote: On Tue, 10 Jan 2012 21:19:18 +0100, Andreas Pakulat ap...@gmx.de wrote: On 10.01.12 10:19:13, Phil Thompson wrote: On Tue, 10 Jan 2012 00:11:49 +0100, Andreas Pakulat ap...@gmx.de wrote: Hi, I'd like to customize the display of a model via

Re: [PyQt] QWebkit / QWebFrame

2012-01-10 Thread Andreas Pakulat
On 09.01.12 16:30:43, James Polk wrote: Howdy, I believe Guru Hans-Peter ;-) posted a collection of PyQt examples that he converted into Python from the Qt C++ examples.. In one titled fancybrowser.py There's a few lines that read...         @QtCore.pyqtSlot()         def

Re: [PyQt] Override QStyledItemDelegate.initStyleOption not working?

2012-01-10 Thread Andreas Pakulat
On 10.01.12 21:19:18, Andreas Pakulat wrote: On 10.01.12 10:19:13, Phil Thompson wrote: On Tue, 10 Jan 2012 00:11:49 +0100, Andreas Pakulat ap...@gmx.de wrote: Hi, I'd like to customize the display of a model via a styleditemdelegate, in particular I want to add a decorating icon

[PyQt] Override QStyledItemDelegate.initStyleOption not working?

2012-01-09 Thread Andreas Pakulat
Hi, I'd like to customize the display of a model via a styleditemdelegate, in particular I want to add a decorating icon depending on some custom role from the model. As far as I can see the easiest way to do this would be overriding initStyleOption since then I can set the icon and icon-size

[PyQt] QIcon and KIcon not totally interchangeable in Python?

2011-12-24 Thread Andreas Pakulat
Hi, from the C++ API's for Qt and KDE I'm using to being able to pass in a KIcon instance whenever an API wants a QIcon, since a KIcon is a QIcon and the compiler will add an implicit conversion operator. I now discovered that this does apparently not work with PyQt4/PyKDE4. Note I'm using sip

Re: [PyQt] PyQt4.Gui.QFileDialog

2011-11-01 Thread Andreas Pakulat
On 01.11.11 12:27:45, Janwillem van Dijk wrote: I am sorry to say that this does not help either. On linux the dialog shows until the sleep finishes on windows it exits as soon as the button is clicked as expected. For the time being I changed to traits. Bit heavy weight perhaps but give the

Re: [PyQt] Small problem storing a list in QSettings

2011-09-04 Thread Andreas Pakulat
On 02.09.11 16:12:49, Phil Thompson wrote: On Thu, 1 Sep 2011 23:04:06 +0200, Andreas Pakulat ap...@gmx.de wrote: Hi, I'm facing a small problem with QSettings and storing a python list in it. It seems that I can't store an empty list properly into a QSettings object, its always

Re: [PyQt] QMovie and underlying C/C++ object has been deleted

2011-09-02 Thread Andreas Pakulat
On 01.09.11 16:32:36, Alan Ezust wrote: Using PyQt Version: 4.6-1, I found this strange thing when I try to create a new QMovie, in response to a signal emit. self._movie = QMovie(self) traceback (most recent call last): File /home/rats-user/rats-dev/build/py/ratsApp/ui/IconStuff.py,

[PyQt] Small problem storing a list in QSettings

2011-09-01 Thread Andreas Pakulat
Hi, I'm facing a small problem with QSettings and storing a python list in it. It seems that I can't store an empty list properly into a QSettings object, its always converted to an invalid QVariant somewhere along the way. The attached sample script shows this, all is well until I create a new

Re: [PyQt] processevents needed for qthreads?

2011-08-12 Thread Andreas Pakulat
On 12.08.11 11:12:00, Peter Bienstman wrote: Hi, I have a threaded program which works fine under Linux, but crashes sometimes under Windows. My suspicion is that this is because I use QtCore.QCoreApplication.processEvents, for which I read everywhere that this is to be avoided and is a

Re: [PyQt] Testing PyQt using code with unit-tests and Mock

2011-07-28 Thread Andreas Pakulat
On 27.07.11 22:19:43, Phil Thompson wrote: On Wed, 27 Jul 2011 21:31:22 +0200, Andreas Pakulat ap...@gmx.de wrote: Hi, I've got a bit of a problem to test my PyQt based code via unit-tests involving mock objects (specifically minimock). I'd like to find a way to emit a signal

[PyQt] Testing PyQt using code with unit-tests and Mock

2011-07-27 Thread Andreas Pakulat
Hi, I've got a bit of a problem to test my PyQt based code via unit-tests involving mock objects (specifically minimock). I'd like to find a way to emit a signal with a mock-object instead of the real, but I can't seem to find a way to do that. The attached example demonstrates the problem.

Re: [PyQt] QString, QTextEdit and Encoding problem

2011-06-28 Thread Andreas Pakulat
On 28.06.11 08:37:06, Yaşar Arabacı wrote: Thanks for the info. Do you know any decent example, tutorial, documents etc. about qt network stack? There should be examples coming with PyQt, including a small chat-app. In addition look at http://doc.qt.nokia.com/4.7/qtnetwork.html and the check

Re: [PyQt] QString, QTextEdit and Encoding problem

2011-06-27 Thread Andreas Pakulat
On 28.06.11 06:26:24, Yaşar Arabacı wrote: Hi, I am havin an encoding problem. If you have read my earlier post, I was doing a simple chat application. Here is how it goes. You're not converting your data correctly. On the sending side you do it properly, decoding to utf-8 and then sending

Re: [PyQt] Qt Contributors Summit

2011-06-08 Thread Andreas Pakulat
On 08.06.11 14:46:55, Attila Csipa wrote: On Wednesday 08 June 2011 12:50:59 you wrote: - the OpenGL requirement : will this still work decent through remote desktop and citrix. imho this is important for business applications. There is no OpenGL *requirement*. So far all

Re: [PyQt] Maintaining index after sort

2011-05-30 Thread Andreas Pakulat
On 29.05.11 15:06:17, Marc Rossi wrote: Thanks for the reply. There must be some core concept of Qt/Model-View programming I am just missing. Makes sense that I can store the data keyed by symbol in the model and update it that way, but I thought I had to emit a dataChanged signal for the

Re: [PyQt] Maintaining index after sort

2011-05-29 Thread Andreas Pakulat
On 28.05.11 21:58:36, Marc Rossi wrote: Hi all. Hopefully this is the correct place. Google searches etc, came up empty although I have to think this is a common question. I have a Model-View app using the QAbstractTableModel as the base class for my model. As I receive data across the

Re: [PyQt] overriding QAbstractFileEngine::beginEntryList

2011-05-24 Thread Andreas Pakulat
On 24.05.11 09:33:31, Jos van den Oever wrote: Hi all, QAbstractFileEngine is a great way to expose data as a file system. I'd like to use it in PyQt4. I've implemented a working test program in C++ and attempted to implement the same version in PyQt4. Yet, the function

Re: [PyQt] overriding QAbstractFileEngine::beginEntryList

2011-05-24 Thread Andreas Pakulat
On 24.05.11 10:28:23, Jos van den Oever wrote: On Tuesday, May 24, 2011 09:49:35 AM Andreas Pakulat wrote: On 24.05.11 09:33:31, Jos van den Oever wrote: Hi all, QAbstractFileEngine is a great way to expose data as a file system. I'd like to use it in PyQt4. I've implemented

Re: [PyQt] Newbie resizing dock widgets question

2011-04-27 Thread Andreas Pakulat
On 27.04.11 00:50:14, Sarah Mount wrote: On Wed, Apr 27, 2011 at 00:17, David Boddie da...@boddie.org.uk wrote: On Wednesday 27 April 2011, Sarah Mount wrote: On Tue, Apr 26, 2011 at 21:45, David Boddie da...@boddie.org.uk wrote: snip: long docking discussion The center widget or

Re: [PyQt] Newbie resizing dock widgets question

2011-04-26 Thread Andreas Pakulat
On 26.04.11 23:45:58, Sarah Mount wrote: However, I have three QDockWidgets, one that is intended to stretch over the bottom of the main window, and the other two above it side by side, like this: [][] [ ] I've set all of the sizePolicy properties to Expanding; the lower dockWidget

Re: [PyQt] QModelIndex.internalPointer

2011-04-25 Thread Andreas Pakulat
On 25.04.11 10:05:17, Jeremy Sanders wrote: Hi - I've hit several crashes with Qt's model code with PyQt. Can someone clear up the ownership rules for objects given to QAbstractItemModel.createIndex and accessed with QModelIndex.internalPointer? I tried creating a layer of indirection

Re: [PyQt] Using layouts in a tab widget

2011-04-24 Thread Andreas Pakulat
On 24.04.11 07:10:24, Sarah Mount wrote: Sorry if this is an obvious question, but I couldn't find an answer to it on the using-containers page or on StackOverflow. I have a bunch of tab widgets that need to have appropriate layouts applied to them and to the tabs they contain. Working with

[PyQt] QSettings.value() returns string instead of bool

2011-03-06 Thread Andreas Pakulat
Hi, I'm using sip API v2 for QVariant here and using QSettings.setValue/value does not work correctly for booleans. See the attached two scripts. In write.py everything looks good, I can store and get back a Python boolean. But running read.py which only reads from the QSettings object always

Re: [PyQt] QSettings.value() returns string instead of bool

2011-03-06 Thread Andreas Pakulat
On 06.03.11 13:23:53, Phil Thompson wrote: On Sun, 6 Mar 2011 13:49:16 +0100, Andreas Pakulat ap...@gmx.de wrote: Hi, I'm using sip API v2 for QVariant here and using QSettings.setValue/value does not work correctly for booleans. See the attached two scripts. In write.py everything

Re: [PyQt] QSettings.value() returns string instead of bool

2011-03-06 Thread Andreas Pakulat
On 06.03.11 15:48:19, Hans-Peter Jansen wrote: On Sunday 06 March 2011, 15:13:13 Andreas Pakulat wrote: On 06.03.11 13:23:53, Phil Thompson wrote: On Sun, 6 Mar 2011 13:49:16 +0100, Andreas Pakulat ap...@gmx.de wrote: Hi, I'm using sip API v2 for QVariant here and using

Re: [PyQt] Two QWebView == Segfault?

2011-02-27 Thread Andreas Pakulat
On 28.02.11 03:53:16, Robert Siemer wrote: siemer@eee:~$ python Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5] on linux2 Type help, copyright, credits or license for more information. ~/.pystartup loaded. from PyQt4 import QtWebKit, QtGui q = QtGui.QApplication([]) wv =

Re: [PyQt] Many Sources for a Signal

2011-02-27 Thread Andreas Pakulat
On 27.02.11 19:06:37, Nahuel Defossé wrote: Hi, we're working in a tabed text editor which uses QtGui's QTabWidget to display a QPlainText edit for each tab. We needed to enable or disable some menus depending on the QTextEditor activity and some other widgets surrounding the tab widget

Re: [PyQt] 2 Updates for the modeltest in PyQt4

2011-02-21 Thread Andreas Pakulat
On 20.02.11 23:52:13, Wolfgang Rohdewald wrote: On Sonntag 20 Februar 2011, Andreas Pakulat wrote: I didn't test yet against an actual model, so might have done something wrong in porting. yep. lists have no add, it is append Heh, worked too much with sets lately. I didn't test

[PyQt] sip.cast changes behaviour of == operator?

2011-02-21 Thread Andreas Pakulat
Hi, still working on the modeltest.py code, picking up one of the older threads about it: http://www.opensubscriber.com/message/pyqt@riverbankcomputing.com/10335500.html As far as I can see the reason for this is the casting done at the start of the ModelTest class. It looks like sip.cast

Re: [PyQt] 2 Updates for the modeltest in PyQt4

2011-02-21 Thread Andreas Pakulat
On 20.02.11 23:52:13, Wolfgang Rohdewald wrote: On Sonntag 20 Februar 2011, Andreas Pakulat wrote: I didn't test yet against an actual model, so might have done something wrong in porting. yep. lists have no add, it is append I didn't test either but pylint did Where do you

[PyQt] 2 Updates for the modeltest in PyQt4

2011-02-20 Thread Andreas Pakulat
QModelIndex, int, int)), self.rowsRemoved) self.runAllTests() -- 1.7.2.3 From c7fb450a7da01dac6fb7351efb547af4ceba97d6 Mon Sep 17 00:00:00 2001 From: Andreas Pakulat ap...@gmx.de Date: Sun, 20 Feb 2011 21:57:25 +0100 Subject: [PATCH 2/2] Add new check for layout-changes. This is a test that has

Re: [PyQt] Selective processEvents

2011-02-04 Thread Andreas Pakulat
On 05.02.11 02:05:12, r wrote: Is it possible to specify a list of events that are to be processed by the Qt main loop? I have an application where: 1. QTimer.singleShot(0, targetFunction) is used to schedule processing of some deferred computations. 2. In some other part of the

Re: [PyQt] Question TreeView, delegates, and functions

2011-01-11 Thread Andreas Pakulat
On 11.01.11 19:19:55, James Polk wrote: Okay,..I gotta' good one for ya'll...lol I have a TreeView displaying data,..it's supported by a QStyleItemDelegate that's controlling the editing/display of various cells in the TreeView. There is a plainTextEdit window also in the main window.

Re: [PyQt] Problem with QFileSystemWatcher

2010-12-10 Thread Andreas Pakulat
On 10.12.10 19:10:36, Hans-Peter Jansen wrote: On Friday 10 December 2010, 11:08:50 NARCISO, Rui wrote: I don't think permissions are the problem because I tried the with the same file in the current folder and then in the parent folder and it works for the first and it doesn't for the

Re: [PyQt] QSqlTableModel.rowCount bug? (and still need infor for beforeInsert)

2010-12-03 Thread Andreas Pakulat
On 03.12.10 17:13:31, KONTRA, Gergely wrote: On Fri, Dec 3, 2010 at 15:56, Wolfgang Rohdewald wolfg...@rohdewald.dewrote: On Freitag 03 Dezember 2010, KONTRA, Gergely wrote: Hi all! I suspect QSqlTableModel.rowCount cannot return numbers above 256. rowCount is not the number

Re: [PyQt] Reporting Bugs in PyQt/Qt

2010-11-29 Thread Andreas Pakulat
On 29.11.10 12:42:53, Ian wrote: 2) When you call setSortingEnabled(True) on a QTreeView the model's sort routine is called twice. No sort is necessary in my use case, because the data is already sorted correctly. However I would accept a single sort column 0, ascending. Besides,

Re: [PyQt] About dimensions of QAbstractTableModel

2010-11-29 Thread Andreas Pakulat
On 29.11.10 18:48:26, Vicent Mas wrote: 2010/11/28 Andreas Pakulat ap...@gmx.de: On 27.11.10 21:27:55, Ian wrote: [...] def rowCount(self, parent = None): ''' return No of rows of data. parent is a QModelIndex ''' return len(self.view) This is wrong, even

Re: [PyQt] Reporting Bugs in PyQt/Qt

2010-11-29 Thread Andreas Pakulat
On 29.11.10 18:44:58, Ian wrote: On 29/11/2010 13:09, Andreas Pakulat wrote: 4) My table has exactly 5 columns of data - ['Name','Ref','Street','Town','Contacts']. If I return 5 from columnCount() then I don't get any headers! If I return 6 then the headers appear - and include an empty

Re: [PyQt] Reporting Bugs in PyQt/Qt

2010-11-29 Thread Andreas Pakulat
On 29.11.10 21:05:43, Ian wrote: Hi Andreas, Thank you for the pointer. I have just googled and found the documentation that mentions this. It is not in the class I am using, nor in the method I am using, nor is it very clear when I find it. Hmmm. Having chased down the definition of

Re: [PyQt] About dimensions of QAbstractTableModel

2010-11-29 Thread Andreas Pakulat
On 29.11.10 23:03:10, Vicent Mas wrote: On 2010-11-29 Andreas Pakulat ap...@gmx.de said: On 29.11.10 18:48:26, Vicent Mas wrote: 2010/11/28 Andreas Pakulat ap...@gmx.de: On 27.11.10 21:27:55, Ian wrote: One such thing is that rowCount can be used to implement hasChildren, which

Re: [PyQt] Bugs galore in QAbstractTableModel???

2010-11-27 Thread Andreas Pakulat
On 27.11.10 20:54:01, Ian wrote: I am trying to use QAbstractTableModel and I am having more than some difficulty. If I return the correct number to columnCount I get no headers. If I return a number that is too big, I get headers, but the model is asked for headers and data for columns

Re: [PyQt] Bugs galore in QAbstractTableModel???

2010-11-27 Thread Andreas Pakulat
On 27.11.10 21:27:55, Ian wrote: On 27/11/2010 21:07, Andreas Pakulat wrote: On 27.11.10 20:54:01, Ian wrote: I am trying to use QAbstractTableModel and I am having more than some difficulty. If I return the correct number to columnCount I get no headers. If I return a number that is too

Re: [PyQt] Problems with latest windows installer

2010-10-09 Thread Andreas Pakulat
On 09.10.10 18:24:23, Phil Thompson wrote: On Sat, 9 Oct 2010 15:00:38 +0200, Detlev Offenbach det...@die-offenbachs.de wrote: On Friday 08 October 2010, Detlev Offenbach wrote: Hi, accessing a https url through QWebView crashes the application (eric web browser). I used the latest

Re: [PyQt] selectionChanged or currentChanged in QTreeView

2010-10-07 Thread Andreas Pakulat
On 06.10.10 22:40:28, danny wrote: Are you sure, that the activated signal doesn't fit your needs? Unfortunately, yes. I forgot to mention, that I have the activated signal connected to a slot that shows when it fires. I also have both selectionChanged and currentChanged overridden to

Re: [PyQt] PyQt support for Qt 4.7

2010-10-07 Thread Andreas Pakulat
On 08.10.10 01:08:08, Giovanni Bajo wrote: On Thu, 07 Oct 2010 16:34:41 +0100, Phil Thompson p...@riverbankcomputing.com wrote: On Thu, 7 Oct 2010 00:35:16 +0200, David Boddie da...@boddie.org.uk wrote: On Tue Oct 5 09:36:49 BST 2010, Phil Thompson wrote: The minehunt example only

Re: [PyQt] the mechanism behind qt signal and slot

2010-09-19 Thread Andreas Pakulat
On 19.09.10 18:18:15, Algis Kabaila wrote: On Sunday 19 September 2010 17:41:59 Von wrote: Hi,Algis, I have looked through this chapter Events, the Clipboard, and Drag and Drop, and I couldn't find anything about signal/slot mechanism. Best Regards Ch 10 does not talk about

Re: [PyQt] the mechanism behind qt signal and slot

2010-09-19 Thread Andreas Pakulat
On 19.09.10 20:58:56, Algis Kabaila wrote: On Sunday 19 September 2010 19:54:54 Andreas Pakulat wrote: Ch 10 does not talk about Signals-Slots directly, but it tells the details about the lower level events. It is the same and one mechanism as Signals- Slots, it is just

Re: [PyQt] Unexpected behaviour

2010-08-17 Thread Andreas Pakulat
On 17.08.10 13:07:00, Peter Milliken wrote: Sorry if the answer to this is obvious, but it is entirely unexpected behaviour IMO :-) I have created a simple GUI with some elements, such as a progressbar and radiobuttons, which are 'dynamically' updated when an underlying Python task (created

Re: [PyQt] Segfault when activating items in a view, more info

2010-08-09 Thread Andreas Pakulat
On 09.08.10 12:06:57, Hans-Peter Jansen wrote: Hi Peter, while not of big help, here are a few more details and the backtrace. Qt 4.6.3, sip 4.10.5, PyQt4 4.7.4. On Monday 09 August 2010, 09:42:05 pe...@lohmanders.se wrote: Yes, the connect signal had the wrong signature, but that

Re: [PyQt] Segfault when activating items in a view, more info

2010-08-09 Thread Andreas Pakulat
On 09.08.10 12:51:48, pe...@lohmanders.se wrote: Hi Andreas! Yes, the model isn't properly implemented, still not sure why I'm getting a segfault rather than infinite loop. Might be some internal stack overflow? Anyway, thanks for your reply! I didn't even consider it would would try

Re: [PyQt] Segfault when activating items in a view, more info

2010-08-09 Thread Andreas Pakulat
On 09.08.10 13:31:15, Hans-Peter Jansen wrote: On Monday 09 August 2010, 12:20:36 Andreas Pakulat wrote: If you use this model on a treeview you'll probably end up in an infinite tree size. The reason is that you're returning a child-count of 2 for each and every index (and the treeview

Re: [PyQt] QProgressBar, repaint, and Mac OS X.

2010-07-20 Thread Andreas Pakulat
On 20.07.10 12:36:48, Jason Ferrara wrote: I have a need to update a QProgressBar while a slider is begin dragged, without processing user events. . I tried calling QProgressBar.repaint(), as shown in the sample code below. This works fine for linux/X11 (and osx/X11), but for osx/aqua I

Re: [PyQt] SIP: overloaded functions with the same Python signature

2010-07-08 Thread Andreas Pakulat
On 08.07.10 11:16:34, Phil Thompson wrote: On Mon, 05 Jul 2010 23:36:57 +0200, GOO Creations goocreati...@gmail.com wrote: Hello This may sound like a really stupid question, but I can't find proper documentation/examples online: I'm using SIP for my C++ - Python bindings. My C++

Re: [PyQt] SIP: overloaded functions with the same Python signature

2010-07-08 Thread Andreas Pakulat
On 08.07.10 14:01:21, GOO Creations wrote: With getFileHash(QString()) the first overload is being called. No its not, the code doesn't even compile if you call getFileHash with anything but 3 arguments. See this example (its the same thing, except no Qt depdendencies): #include stdio.h class

Re: [PyQt] Processing signals from a called method while the method executes

2010-07-02 Thread Andreas Pakulat
On 01.07.10 21:35:44, alan moore wrote: I've encountered this problem twice now in subtle ways, I think this is at the root of my last question about the QWebView; I've included sample code this time to illustrate. In the attached script, I have a widget class and a processor class. The

Re: [PyQt] splitters

2010-06-01 Thread Andreas Pakulat
On 01.06.10 15:41:01, Lic. José M. Rodriguez Bacallao wrote: hi folks, does anyone know where to get a four way splitter that I can use with PyQt4? You mean this: Widget A | Widget B --- Widget C | Widget D Thats doable by nesting splitters, i.e. create one and put a splitter

Re: [PyQt] Cannot get data to be fetched by QTableView through QAbstractTableModel

2010-04-23 Thread Andreas Pakulat
On 23.04.10 08:36:22, Bjorn Egil Ludvigsen wrote: Hi, I cannot get any data to be shown in my QTableView and wonder now if something could be wrong with returning the QVariants(), as someone on Daniweb said this is not necessary anymore after PyQt 4.6. Also I read the PyQt documentation

Re: [PyQt] Overcoming slow startup

2010-04-12 Thread Andreas Pakulat
On 11.04.10 22:27:04, Thorsten Kampe wrote: Hi, I wrote a simple application that displays output of an external CLI tool in a QTreeWidget. In a normal setup, the external tool will take less than one minute to terminate. Unfortunately - depending on the setup of the external application

Re: [PyQt] How to use a pixmap in a thread ?

2010-03-06 Thread Andreas Pakulat
On 06.03.10 09:04:57, Vincent Vande Vyvre wrote: Hi, In a image viewer I need to show a list of pictures into a trailer. Since the source folder contain a large amount of pictures, I want to create they thumbnails in a thread, but PyQt return an error. QPixmap::scaled: Pixmap is a

Re: [PyQt] Get a list of selected rows in a QTableWidget

2010-03-04 Thread Andreas Pakulat
On 04.03.10 17:52:01, Russell Valentine wrote: rows=[] for idx in self.table.selectedIndexes() rows.append(idx.row()) Better would be using self.table.selectionModel().selectedRows(), the above can add duplicates to your list of rows if multiple columns are selected. Andreas -- Accent

Re: [PyQt] Is there a way to run the interp AND a gui?

2010-03-02 Thread Andreas Pakulat
On 02.03.10 15:04:37, Jason H wrote: I am working on the new Qt/Kinetic stuff and one thing I would really like to have is an interactive GUI for it. Ideally, I'd have something like the interactive interpreter, which when I type x=QGrahpicsTextItem(...) and add it to the scene, it appears

  1   2   3   4   5   6   7   8   9   >