Re: [PyQt] Absolute paths in qrc file.

2013-06-28 Thread Baz Walter
just use a symlink to work around this. PS: For standard icons, a possible alternative solution is to use QIcon.fromTheme (only really useful on Linux, though): https://qt-project.org/doc/qt-4.8/qicon.html#fromTheme -- Regards Baz Walter ___ PyQt

Re: [PyQt] resizing layouts

2013-05-14 Thread Baz Walter
the four-pane arrangement. Once the splitters have been set up, you just need to add a top-level layout for the main form. -- Regards Baz Walter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] ANN: PyQt5 Snapshots Available

2013-05-06 Thread Baz Walter
On 06/05/13 18:51, V. Armando Sole wrote: On 06.05.2013 18:44, Phil Thompson wrote: On Mon, 06 May 2013 18:24:59 +0200, V. Armando Sole s...@esrf.fr wrote: On 06.05.2013 16:49, Phil Thompson wrote: If so, is to remove it an absolute necessity? Nothing is absolutely necessary - but I see no

Re: [PyQt] Problems with new-style signal/slot syntax

2013-04-10 Thread Baz Walter
On 09/04/13 22:19, Phil Thompson wrote: On Tue, 09 Apr 2013 21:06:44 +0100, Baz Walter baz...@ftml.net wrote: After a bit of trial and error, it seems that signatures with plain or const arguments work okay, but the ones with pointer arguments don't. That is, unless the full C++ signature

[PyQt] Problems with new-style signal/slot syntax

2013-04-09 Thread Baz Walter
at 0x18308c0 (Is it intended that these latter two variants work? It doesn't seem to be documented anywhere). -- Regards Baz Walter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Crasher in QShortcut contructor

2013-04-08 Thread Baz Walter
) This is with: python 2.7.3, qt 4.8.4, sip 4.14.6-snapshot-395bf9f00aa6, pyqt snapshot-4.10.1-a8db83af435d -- Regards Baz Walter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Qt message handler has wrong signature with Qt5

2013-04-02 Thread Baz Walter
' % ( sip.getapi('QString'), type(kind), type(msg))) QtCore.qInstallMsgHandler(handler) app.desktop().screenGeometry(None) -- Regards Baz Walter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo

Re: [PyQt] Qt message handler has wrong signature with Qt5

2013-04-02 Thread Baz Walter
On 03/04/13 01:17, Phil Thompson wrote: On Wed, 03 Apr 2013 00:16:49 +0100, Baz Walter baz...@ftml.net wrote: Hello For Qt4, QtCore.qInstallMsgHandler installs a Qt message handler with the following signature: void myMsgHandler(QtMsgType, const char *); Using PyQt4 with Qt4

Re: [PyQt] Makespec issue when building PyQt4 against Qt5

2013-03-29 Thread Baz Walter
On 27/03/13 10:45, Phil Thompson wrote: On Sat, 23 Mar 2013 02:47:09 +, Baz Walter baz...@ftml.net wrote: Hello When building PyQt4 against Qt5, I got this error: Determining the layout of your Qt installation... Error: Unable to find the qmake configuration file /usr

Re: [PyQt] QLocalServer failures with Qt5

2013-03-27 Thread Baz Walter
On 25/03/13 01:45, Baz Walter wrote: I have some simple IPC code that has been working fine with Qt4 but doesn't with Qt5. The problem happens after calling QLocalServer.listen(), and gives errors like this: QSocketNotifier: Invalid socket specified QSocketNotifier: Invalid socket

[PyQt] QLocalServer failures with Qt5

2013-03-24 Thread Baz Walter
) does work as expected, though. -- Regards Baz Walter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Makespec issue when building PyQt4 against Qt5

2013-03-22 Thread Baz Walter
). -- Regards Baz Walter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] QListWidget.sortItems() problem

2011-09-20 Thread Baz Walter
On 20/09/11 18:56, Hugo Léveillé wrote: I am writting a quick application inside another software that use PyQT In previous version, I could sort all my listwidget without any problem using the .sortItems() But in the latest release of that version, I get the following error on some of my

Re: [PyQt] TypeError object of type int has no len issue

2011-09-13 Thread Baz Walter
On 13/09/11 15:14, ad...@mbnoimi.net wrote: Actually I asked for this issue in another thread but I faced a problem can't find any solution for it, so could you please help me to fix it? When I run the following class I get TypeError object of type int has no len() at for loop line 51. messages

Re: [PyQt] Help with Login Dialog / QThread issues

2011-08-08 Thread Baz Walter
On 08/08/11 14:58, Eric Frederich wrote: I'm just a little confused on what connections to make. I'm sure I could get something working but I'd be going about it the wrong way. Forget my original post. This is what I want. I want a login dialog with username, password and group. I want that

Re: [PyQt] desktop workspace

2011-08-07 Thread Baz Walter
On 06/08/11 23:59, Hans-Peter Jansen wrote: On Saturday 06 August 2011, 01:35:55 emmanuel_mays...@lynceantech.com wrote: I am trying to save the geometry and and the workspace where the application has been closed. Is there a way with Python/Qt to get the info on the workspace number!? While

Re: [PyQt] desktop workspace

2011-08-06 Thread Baz Walter
On 06/08/11 00:35, emmanuel_mays...@lynceantech.com wrote: I am trying to save the geometry and and the workspace where the application has been closed. Is there a way with Python/Qt to get the info on the workspace number!? you could use dbus: import dbus bus = dbus.SessionBus() kwin =

Re: [PyQt] Help with Login Dialog / QThread issues

2011-08-06 Thread Baz Walter
On 05/08/11 17:46, Eric Frederich wrote: Any takers? On Thu, Jul 7, 2011 at 12:38 PM, Eric Frederich eric.freder...@gmail.com wrote: Hello, I am trying to create a login dialog for my application. Logging in can take a couple of seconds so I wanted to show a progress bar during the login

Re: [PyQt] modeless dialog - repeated windows

2011-07-25 Thread Baz Walter
On 25/07/11 12:20, Susana Sanchez Exposito wrote: I would like if the user selects the option to open the modeless dialog and this dialog is opened yet, this dialog would be focused instead of opening another window of the same modeless dialog. import sys from PyQt4 import QtGui, QtCore

Re: [PyQt] Moving PyQt programs to Python 3

2011-07-15 Thread Baz Walter
On 15/07/11 07:48, Algis Kabaila wrote: Currently reputable distros such as ubuntu do not package binaries of PyQt with Python3. There are other unsupported binaries in some ppa's (Personal Packaging Archives).. The ones that I looked at do not bother to tell me what version of Python they are

Re: [PyQt] Bring to Front|Send to Back: raise_() and lower()

2011-07-14 Thread Baz Walter
On 14/07/11 18:21, James Polk wrote: Aside from the depth modifiers in the email subject,.. Are there any other, more specific, ways to alter, control, and/or modify a UI's depth ? QWidget.stackUnder http://doc.qt.nokia.com/4.7/qwidget.html#stackUnder QStackedLayout / QStackedWidget

Re: [PyQt] A dire warning message

2011-07-08 Thread Baz Walter
On 08/07/11 10:22, Raoul Snyman wrote: On Fri, 8 Jul 2011 19:00:52 +1000, Algis Kabaila wrote: I think it is time to give it rest, unless someone can suggest antother lead. The fun of it begins to feel like bashing one's head against a wall. After all I can live with the dire warning message.

Re: [PyQt] A dire warning message

2011-07-07 Thread Baz Walter
On 07/07/11 13:00, Algis Kabaila wrote: On Thu, 7 Jul 2011 09:03:47 PM Hans-Peter Jansen wrote: On opening a file dialog, I get this warning: KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to

Re: [PyQt] A dire warning message

2011-07-07 Thread Baz Walter
On 08/07/11 02:36, Algis Kabaila wrote: On Fri, 8 Jul 2011 03:36:40 AM Baz Walter wrote: Hmm, at the first glance, this is a KDE problem, since KDE plugs its own file dialog into Qt, but fails to properly deal with locales there after due to them not being initialized correctly. This is going

Re: [PyQt] QLineEdit vs. menu keyboard shortcuts

2011-06-30 Thread Baz Walter
On 30/06/11 16:56, Nathan Weston wrote: On 6/30/2011 10:44 AM, Nathan Weston wrote: On 6/29/2011 6:16 PM, Baz Walter wrote: I updated to the latest Qt/PyQt and it's working now. My original application is working correctly as well. glad you got it working. one final thought: rather stupidly

Re: [PyQt] QLineEdit vs. menu keyboard shortcuts

2011-06-29 Thread Baz Walter
On 29/06/11 18:21, Nathan Weston wrote: On 6/29/2011 1:07 PM, Baz Walter wrote: as was suggested earlier in this thread, if the line-edit doesn't have the keyboard focus, it can't trigger its own shortcuts. if it *does* have the focus, but the shortcut sequence is not one it handles

Re: [PyQt] QLineEdit vs. menu keyboard shortcuts

2011-06-29 Thread Baz Walter
On 29/06/11 18:57, Nathan Weston wrote: On 6/29/2011 1:32 PM, Baz Walter wrote: going back to your earlier example of dragging in the line-edit to change its value: all you need to do is clearFocus() when the drag starts and setFocus() when the drag ends. that way, whilst the drag

Re: [PyQt] QLineEdit vs. menu keyboard shortcuts

2011-06-28 Thread Baz Walter
On 28/06/11 19:17, Hans-Peter Jansen wrote: On Tuesday 28 June 2011, 19:56:35 Nathan Weston wrote: In the latter mode, the widget is temporarily set as non-editable, so its built-in Undo behavior doesn't work at all (but it still eats the keyboard event!). If you're subclassing QLineEdit

Re: [PyQt] QLineEdit vs. menu keyboard shortcuts

2011-06-28 Thread Baz Walter
On 28/06/11 19:28, Yaşar Arabacı wrote: On 28/06/11 19:17, Hans-Peter Jansen wrote: On Tuesday 28 June 2011, 19:56:35 Nathan Weston wrote: In the latter mode, the widget is temporarily set as non-editable, so its built-in Undo behavior doesn't work at all (but it still eats the keyboard

Re: [PyQt] Bug report: multiple QApplication instances cause a segfault

2011-06-22 Thread Baz Walter
On 21/06/11 17:04, David Townshend wrote: The problem is that creating (and quitting) multiple QApplications in succession causes a segfault. This situation tends to occur in unit tests, particularly in testing subclasses of QApplication. The following snippet illustrates the problem: from

Re: [PyQt] Bug report: multiple QApplication instances cause a segfault

2011-06-22 Thread Baz Walter
On 22/06/11 20:49, David Townshend wrote: On Wed, Jun 22, 2011 at 2:34 PM, Baz Walterbaz...@ftml.net wrote: according to the qt docs, only one application object should be created at a time, and there is a global qApp pointer which refers to the current instance. this suggests that, in pyqt,

[PyQt] bug in latest sip release

2011-06-18 Thread Baz Walter
after recently upgrading sip, several applications that use treeviews started producing a lot of errors like this: TypeError: expected 1 arguments, got 0 this is using: python 2.7.2, qt 4.7.3, sip 4.12.3, pyqt 4.8.4 the following test case demonstrates the problem: import sys from PyQt4

Re: [PyQt] A possible bug in PyQt when loading Boolean values via QSettings

2010-12-27 Thread Baz Walter
On 27/12/10 10:04, Phil Thompson wrote: A typical backend will save values as a string without any metadata describing the original type. In QVariant v1 the conversion back is done by QVariant::toBool() which only checks for true and false, so that is the behaviour to be replicated in QVariant

Re: [PyQt] QContextMenuEvent on a QTreeWidgetItem

2010-12-17 Thread Baz Walter
On 17/12/10 09:40, Christopher Evans wrote: Hi guys, I have been using pyqt for years at many different jobs and many different projects, however some things elude me. (I am a self-taught noob at heart) I have written many tutorials for the community to help spread knowledge, but this is one

Re: [PyQt] PyQt4.QtGui + uuid.uuid4() = segfault

2010-12-10 Thread Baz Walter
On 10/12/10 07:57, Christopher Singley wrote: Sorry, I spoke too fast. The issue persists on my system: Python 2.7.1 (r271:86832, Dec 1 2010, 23:37:45) [GCC 4.4.5] on linux2 Type help, copyright, credits or license for more information. from PyQt4 import QtCore, QtGui QtCore.PYQT_VERSION_STR

Re: [PyQt] Problem with QFileSystemWatcher

2010-12-10 Thread Baz Walter
On 10/12/10 10:08, NARCISO, Rui wrote: When I use absolute paths (os.path.abspath) or real paths (os.path.realpath) or even relative paths (../../toto) it doesn't work. It only works when I use only the file name. I don't think permissions are the problem because I tried the with the same

Re: [PyQt] PyQt4.QtGui + uuid.uuid4() = segfault

2010-12-10 Thread Baz Walter
On 10/12/10 17:27, Hans-Peter Jansen wrote: On Friday 10 December 2010, 18:04:08 Baz Walter wrote: On 10/12/10 07:57, Christopher Singley wrote: Sorry, I spoke too fast. The issue persists on my system: Python 2.7.1 (r271:86832, Dec 1 2010, 23:37:45) [GCC 4.4.5] on linux2 Type help

Re: [PyQt] Problem with QFileSystemWatcher

2010-12-10 Thread Baz Walter
On 10/12/10 18:10, Hans-Peter Jansen wrote: Dear Rui, On Friday 10 December 2010, 11:08:50 NARCISO, Rui wrote: When I use absolute paths (os.path.abspath) or real paths (os.path.realpath) or even relative paths (../../toto) it doesn't work. It only works when I use only the file name. Works

Re: [PyQt] Problem with QFileSystemWatcher

2010-12-09 Thread Baz Walter
On 09/12/10 12:26, NARCISO, Rui wrote: Hi all I can't seem to be able to make QFileSYstemWatcher work with a file (to see if it's contents change). At the end of this mail you'll find a minimum example that doesn't worked. I tried several connections with different syntaxes but nothing works.

Re: [PyQt] Bug in QFileDialog

2010-12-09 Thread Baz Walter
On 09/12/10 06:55, Vicent Mas wrote: On 2010-12-08 Hans-Peter Jansenh...@urpla.net said: [...] Vicent, bad luck: check the fileMode paragraph a couple of lines below: http://doc.trolltech.com/latest/qfiledialog.html#FileMode-enum This function will set the labels for the FileName and

Re: [PyQt] Bug in QFileDialog

2010-12-09 Thread Baz Walter
On 09/12/10 18:01, Vicent Mas wrote: On 2010-12-09 Baz Walterbaz...@ftml.net said: but it means that there is still a bug: in the doItWrong function of my script the setFileMode call doesn't reset the FileName label to a default value. So it seems that I'll end writing my first C++ code (using

Re: [PyQt] PyQt metrics

2010-12-09 Thread Baz Walter
On 09/12/10 17:40, Hans-Peter Jansen wrote: Hi Phil, hi *, ever wanted to know, how many classes and methods PyQt4 provides? I'm not sure, if my calculations are valid, but according to my QD script (attached), they are: Metric(name: PyQt4.phonon, modules: 1, classes: 52, methods: 2274,

Re: [PyQt] Bug in QFileDialog

2010-12-09 Thread Baz Walter
On 09/12/10 18:57, Vicent Mas wrote: (I've lost a great opportunity for writing C++ code. That's a pitty ;-) be thankful for small mercies :-) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Remove resize arrow

2010-12-09 Thread Baz Walter
On 09/12/10 19:33, Hugo Leveille wrote: I have a mainwindow that I would like to remove the resize handle on the bottom right so that the window is not resizable. you can remove the resize handle with: mainwindow.statusBar().setSizeGripEnabled(False) but that won't make the window

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

2010-11-27 Thread Baz Walter
On 27/11/10 21:27, 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 big, I

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

2010-11-27 Thread Baz Walter
On 27/11/10 23:02, Ian wrote: On 27/11/2010 22:23, Baz Walter wrote: the python version andreas is referring to is modeltest.py. it can be found in the pyqt source in the contrib/pymodeltest directory. I found the version I think I need (4.7.4) at http://python-qt4.sourcearchive.com

Re: [PyQt] QStandardItemEditorCreator missing

2010-11-25 Thread Baz Walter
On 25/11/10 17:23, Hans-Peter Jansen wrote: Unfortunately, it's still not behaving right: the color chooser is created and shown correctly on double click, one can choose another value, but that isn't supplied back into the table correctly, although the property getter _is_ called and given the

Re: [PyQt] Detecting which Python version is used by SIP and PyQt

2010-10-23 Thread Baz Walter
On 23/10/10 01:54, Xavion wrote: Arch Linux has recently switched its 'python' package to the Python v3 branch. SIP and PyQt still require the 'python2' package, probably because the unpatched D-Bus Python bindings currently won't work with Python v3. there's never a dull moment with arch :)

Re: [PyQt] Detecting which Python version is used by SIP and PyQt

2010-10-23 Thread Baz Walter
On 23/10/10 12:25, Hans-Peter Jansen wrote: On Saturday 23 October 2010, 02:54:40 Xavion wrote: Doing so will save me from having to hard-code something like #!/usr/bin/env python2 into the main executable file, only to be disappointed after finding out that some Linux distributions have

Re: [PyQt] Detecting which Python version is used by SIP and PyQt

2010-10-23 Thread Baz Walter
On 23/10/10 18:07, Phil Thompson wrote: On Sat, 23 Oct 2010 17:39:28 +0100, Baz Walterbaz...@ftml.net wrote: On 23/10/10 12:25, Hans-Peter Jansen wrote: On Saturday 23 October 2010, 02:54:40 Xavion wrote: Doing so will save me from having to hard-code something like #!/usr/bin/env python2

Re: [PyQt] Detecting which Python version is used by SIP and PyQt

2010-10-23 Thread Baz Walter
On 23/10/10 20:04, Hans-Peter Jansen wrote: On Saturday 23 October 2010, 19:28:34 Baz Walter wrote: On 23/10/10 18:07, Phil Thompson wrote: On Sat, 23 Oct 2010 17:39:28 +0100, Baz Walterbaz...@ftml.net wrote: On 23/10/10 12:25, Hans-Peter Jansen wrote: On Saturday 23 October 2010, 02:54:40

Re: [PyQt] Detecting which Python version is used by SIP and PyQt

2010-10-23 Thread Baz Walter
On 23/10/10 23:45, Hans-Peter Jansen wrote: On Saturday 23 October 2010, 22:35:36 Baz Walter wrote: arch has been around for quite a while now and has a growing community of very loyal users. it may do some things very differently, but at the end of the day, it's just another linux distro

Re: [PyQt] QSettings usage - multiple?

2010-10-21 Thread Baz Walter
On 20/10/10 14:22, Randy Heiland wrote: Hello, Is it possible to have multiple QSettings files for an app? Basically, our situation is that we have an app and we save various params associated with the app via the QSettings mechanism. However, we'd like to be able to save/read different

Re: [PyQt] question on drag and drop

2010-10-19 Thread Baz Walter
On 19/10/10 18:13, danny wrote: Howdy, I'm trying to impliment DnD in a QTreeView with a custom model derived from QAbstractItemModel. I have run into the following question. I want to be able to drag onto the tree from an external source. I also want to do internal DnD to rearrange items. The

Re: [PyQt] question on drag and drop

2010-10-19 Thread Baz Walter
On 19/10/10 21:07, danny wrote: when your reimplemented mimeTypes() method is called internally by qt, the first item in the returned list will be used to set the format. Ok, I think I get it. Internal DnD will use the first specified mime type. That still raises the question of the

Re: [PyQt] QListWidgetItem appearance.

2010-10-16 Thread Baz Walter
On 16/10/10 07:52, Vincent Vande Vyvre wrote: Hi, I just upgraded from Ubuntu 10.04 to 10.10, therefore, python 2.6.5/PyQt 4.7.4 to python 2.6.6/Pyqt 4.7.4 It seems that the appearance of the QListWidgetItem changed. i'd guess that the problem is much more likely to be due to a change in qt

Re: [PyQt] QFtp

2010-10-12 Thread Baz Walter
On 12/10/10 13:53, lucabe...@libero.it wrote: Hello i have made a small test using qftp, but i make some error: class Form(QWidget, Ui_Form): Class documentation goes here. def __init__(self, parent = None): Constructor super(Form,

Re: [PyQt] Observations with nesting-level: Performance of QTreeView

2010-10-10 Thread Baz Walter
On 10/10/10 15:43, Knacktus wrote: Hi everyone, a little update of my observations so far for the interested: The flatter the tree, the better the performance. I've done some tests with 10 children per parent. Now, that looks much better. For 10 items expanding all takes about 30 seconds.

Re: [PyQt] Observations with nesting-level: Performance of QTreeView

2010-10-10 Thread Baz Walter
On 10/10/10 18:39, Knacktus wrote: Those results are very interesting! Thanks. Just to confirm: You had 5000 items and to expand the whole tree took only 0.67 seconds? Also, only 1 call to parent(). Now, that makes my wonder and hope. The main differences are that I'm on Windows 7 and I'm using

Re: [PyQt] Performance of QTreeView

2010-10-09 Thread Baz Walter
On 09/10/10 21:00, Knacktus wrote: Hi everyone, I've got a QTreeView with a custom model. I've set the setUniformRowHeights property to True: self.setUniformRowHeights(True) Now, to expand the tree with a model with 1 rows and 6 cols calling the expandAll slot takes about 1 minute! (on a

Re: [PyQt] (no subject)

2010-10-07 Thread Baz Walter
On 07/10/10 19:00, Nate Reid wrote: Below is a sample program that demonstrates a problem with the updating of a Tab's size when setTabsClosable(false) is dynamically set. Run the program as is and add some tabs, and then remove some with either the close box or the 'Remove' button. When the

Re: [PyQt] trouble installing pyqt4 from source on fedora 13

2010-09-30 Thread Baz Walter
On 30/09/10 16:24, Darren Dale wrote: I tried also to find how the fedora devs managed to patch and build pyqt in the fedora environment, but I can't find anything. Aren't they compelled by the terms of the GPL to make such patches available? any patches should be in fedora's src.rpm for pyqt,

Re: [PyQt] Translating from a function

2010-09-29 Thread Baz Walter
On 29/09/10 15:19, Eric Frederich wrote: I have a bunch of helper functions that raise exceptions and I'd like the messages in those exceptions to be translated. How should I get those strings translated? QObject.tr is not a static method, I can't just call it. I need a QObject don't I?

Re: [PyQt] Bug in sip-4.11.1 and PyQt-4.7.7 ?

2010-09-28 Thread Baz Walter
On 27/09/10 19:45, Gerard Vermeulen wrote: Phil, when running the following code #!/usr/bin/env python # -*- coding: utf-8 -*- import PyQt4.Qt as Qt class MyWidget(Qt.QWidget): def __init__(self, parent=None): super(Qt.QWidget, self).__init__(parent) # __init__() #

Re: [PyQt] API 2 and Qt Designer

2010-09-28 Thread Baz Walter
On 28/09/10 11:11, Sybren A. Stüvel wrote: PS: Please reply to just the list, there is no need to do reply-all, I'm on the list too. With a reply-all I get your mail twice. there is a mailman option to prevent this. go here: http://www.riverbankcomputing.com/mailman/options/pyqt and look for

Re: [PyQt] Drop to system

2010-09-09 Thread Baz Walter
On 09/09/10 01:17, David Boddie wrote: On Wed Sep 8 22:33:17 BST 2010, Hugo Leveille wrote: I have looked at the doc but all I could find was drag and drop within the pyqt app itself. What id like to do is the, for exemple, attach an url or whatever needed to an item so that if I drag the item

Re: [PyQt] sizing a QTextEdit...

2010-09-09 Thread Baz Walter
On 09/09/10 05:12, Peter Milliken wrote: Sorry, that previous email should have explained that within the main QFrame I am attempting to lay everything out using gridlayout. On Thu, Sep 9, 2010 at 2:06 PM, Peter Millikenpeter.milli...@gmail.comwrote: Probably not. The code snippet might be a

Re: [PyQt] Drop to system

2010-09-09 Thread Baz Walter
On 09/09/10 14:29, Massimo Di Stefano wrote: tring to learn how to use the Drag class, i tried to hack the draggabletext.py from the pyqt source : - http://www.geofemengineering.it/draggabletext_.py i'm now blocked on how to reuse the same code to drag a QTableWidgetItem from a QtTablewidjet,

Re: [PyQt] Drag to system

2010-09-08 Thread Baz Walter
On 08/09/10 15:27, Hugo Léveillé wrote: I did but I couldn't find how to do it even if I know the info is there somewhere in the doc. Any hints are welcomed On Wed, 08 Sep 2010 15:50 +0200, Hans-Peter Jansenh...@urpla.net wrote: On Wednesday 08 September 2010, 15:05:21 Hugo Léveillé wrote: I

Re: [PyQt] How do I find the system colour-theme?

2010-08-27 Thread Baz Walter
On 27/08/10 11:07, Jonathan Noble wrote: Hi, I am using a QTableWidget that needs to have one row's background colour changed. However, I do not know how to reset the change based on the systems colour theme. This image shows what happens if I do not do hackish reset:

Re: [PyQt] setCursor does not seem to work as expected in graphicsScene/View

2010-08-26 Thread Baz Walter
On 26/08/10 08:45, Christopher M. Nahler wrote: Thank you Baz! You pointed me to the solution of my problem ... and it was easier than your solution :-) you're welcome :) I did not know of *self.viewport()* in the view class. Updating the cursor of the view with self.viewport().setCursor()

Re: [PyQt] setCursor does not seem to work as expected in graphicsScene/View

2010-08-25 Thread Baz Walter
On 25/08/10 09:54, Christopher M. Nahler wrote: I'll take it as an if all else fails solution :-) not giving hope up now! I have changed the item cursors and view cursors to be differnt to see which one wins as sometimes it looked as if it was working. But it turns out its the item cursors that

Re: [PyQt] Next PyQt, SIP and QScintilla Releases

2010-08-23 Thread Baz Walter
On 23/08/10 19:25, Phil Thompson wrote: Got it - should be fixed in tonight's PyQt/SIP snapshots. your timing is impeccable :) i was just about to hit send and post a test case (although not a very good one). thanks for fixing this so quickly - it was starting to drive me nuts!

Re: [PyQt] help: beforeUpdate QSqlRecord bus error

2010-08-23 Thread Baz Walter
On 23/08/10 16:11, Scott Frankel wrote: Please excuse the re-post. I'm at a loss as to why executing a QSqlRecord object's count() or isEmpty() method results in a bus error crash. Suggestions would be greatly appreciated. i'm probably not going to be able to help you myself, but in any case

Re: [PyQt] Next PyQt, SIP and QScintilla Releases

2010-08-22 Thread Baz Walter
On 22/08/10 09:56, Phil Thompson wrote: Development is finished on the next releases of PyQt, SIP and QScintilla, so testing your favorite application against current snapshots would be a good idea... i'm seeing lots of RuntimeError: underlying C/C++ object has been deleted errors related to

Re: [PyQt] memory leak using QMainWindow.removeToolBar

2010-08-16 Thread Baz Walter
On 16/08/10 18:27, danny wrote: Howdy, I have run into this curious problem that I think is caused by a memory leak or improper reference counting related to toolbars in QMainWindow.removeToolBar. The problem appears when you remove a toolbar but keep an instance variable maintaining a

Re: [PyQt] New style signals question

2010-08-04 Thread Baz Walter
On 04/08/10 18:50, detlev wrote: in my code I have a line like act.triggered.connect(self.myslot) The slot has a method signature like def myslot(self, fn = None, foo = bar): However, it is always called with fn set to False. It seems that triggered(bool) is the default signal. How do I get

Re: [PyQt] New style signals question

2010-08-04 Thread Baz Walter
On 04/08/10 20:07, Phil Thompson wrote: Specific overloads are obtained by indexing the bound signal with the signature you want, so... act.triggered[()].connect(self.myslot) can you explain why i see errors like this when using that syntax: File menusys.py, line 1522, in __init__

Re: [PyQt] New style signals question

2010-08-04 Thread Baz Walter
On 04/08/10 20:25, Phil Thompson wrote: On Wed, 04 Aug 2010 20:20:11 +0100, Baz Walterbaz...@ftml.net wrote: On 04/08/10 20:07, Phil Thompson wrote: Specific overloads are obtained by indexing the bound signal with the signature you want, so... act.triggered[()].connect(self.myslot) can

Re: [PyQt] Good simple text editor

2010-08-02 Thread Baz Walter
On 29/07/10 22:46, dusan smitran wrote: Im building a simple sql editor with tabs. How could i implement a Intellisense/Auto-complete feature where the user would hit alt+space and a dropdown menu would appere. On 02/08/10 11:53, dusan smitran wrote: Could u recommend me a simple text

Re: [PyQt] Error when converting QVariant back to Python object

2010-06-04 Thread Baz Walter
On 03/06/10 16:01, Phil Thompson wrote: On Sat, 29 May 2010 19:46:58 +0100, Baz Walterbaz...@ftml.net wrote: looks like i spoke too soon: i now get segfaults when trying to emit signals that send char *. the particular signal that caused the crash was propertyChanged(const char *prop, const

Re: [PyQt] Error when converting QVariant back to Python object

2010-05-29 Thread Baz Walter
On 29/05/10 10:00, Phil Thompson wrote: Fixed in the current PyQt snapshot - sort of. It assumes that the char * refers to a '\0' terminated string, which may not be the case. Although earlier versions didn't seem to crash, I don't think they worked any better. thanks phil i've tried the new

Re: [PyQt] Error when converting QVariant back to Python object

2010-05-29 Thread Baz Walter
On 29/05/10 17:37, Baz Walter wrote: On 29/05/10 10:00, Phil Thompson wrote: Fixed in the current PyQt snapshot - sort of. It assumes that the char * refers to a '\0' terminated string, which may not be the case. Although earlier versions didn't seem to crash, I don't think they worked any

Re: [PyQt] Error when converting QVariant back to Python object

2010-05-27 Thread Baz Walter
On 27/05/10 18:44, Baz Walter wrote: when i connect a handler to the SCN_MODIFIED signal in QScintilla-2.4.3 i see the following error: TypeError: unable to convert a QVariant back to a Python object i've tried setting sip.setapi('QVariant', 2), but to no avail. this is using: gcc 4.4.1

Re: [PyQt] Drag Drop with QTreeWidget

2009-12-14 Thread Baz Walter
in the rowsInserted function... -Message d'origine- De : Baz Walter [mailto:baz...@ftml.net] Envoyé : vendredi 11 décembre 2009 21:46 À : NARCISO, Rui Cc : PyQt (E-mail) Objet : Re: [PyQt] Drag Drop with QTreeWidget NARCISO, Rui wrote: Hi again Your approach worked nicely but when I tried

Re: [PyQt] Drag Drop with QTreeWidget

2009-12-11 Thread Baz Walter
NARCISO, Rui wrote: Hi again Your approach worked nicely but when I tried to enable sorting using: self.setSortingEnabled(True) self.sortByColumn(0, QtCore.Qt.AscendingOrder) I get a segmentation fault. If i disable the sortByColumn then it works. How then to set the

Re: [PyQt] Drag Drop with QTreeWidget

2009-12-02 Thread Baz Walter
NARCISO, Rui wrote: and when doing so create the sub-node Folder1 if it does not exist within campaign and put the dragged items under folder1 (and not campaign where they were dropped). How to do this ? Do I do this in a dropEvent? In a dropEventAction ? you could monitor the tree using

Re: [PyQt] Drag Drop with QTreeWidget

2009-12-01 Thread Baz Walter
Hi all I'm trying to implement Drag Drop in my QTreeWidget based GUI but it is not clear to me how to proceed (after having read the Doc and googled it). I have several question (tree = QTreeWidget()) 1) I have activated: tree.setSelectionMode(QAbstractView.ExtendedSelection)

Re: [PyQt] QTreeWidget Column Resize

2009-11-30 Thread Baz Walter
andre hotz wrote: I want to get notified when the user changes the size or position of a column so I can store the new size/position and save it in a config file. Unfortunatly, there does not seem to be an event or something which informs me about the changes. I tried it by declaring a

Re: [PyQt] Completely removing items from a layout

2009-11-28 Thread Baz Walter
Lee Harr wrote: I wrote about this a couple of weeks ago, but I did not have a small working example to show the problem I'm having. Now I do. I have a layout created in Qt4 Designer which I fill with a series of complex layouts at runtime. That works great. Later on, I want to completely

Re: [PyQt] QTableWidget editing question

2009-11-27 Thread Baz Walter
Steve Zatz wrote: I am new to qt and pyqt but have been using wxPython for a long time. I am converting a moderately complex application from wxPython to pyqt and have been impressed with the ease of using pyqt. Here's my question and I apologize for the verbiage. The ability to get at the

Re: [PyQt] setting Popup windowFlag causes system to become unresponsive

2009-11-27 Thread Baz Walter
Jugdish wrote: 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.

Re: [PyQt] re: images aren't saved with this webcapturing script

2009-11-22 Thread Baz Walter
Victor Noagbodji wrote: i'm running under windows xp. i tried both combinations python25+pyqt-4.4.3-1 and python26+pyqt-4.6.2-1 and the result is the same... works fine for me on linux using [python 2.6.1, qt 4.5.2, pyqt 4.4.4] or [python 2.6.2, qt 4.5.2, pyqt 4.6.1].

Re: [PyQt] problem in making pyqt up and running...

2009-11-22 Thread Baz Walter
python.noob wrote: Are u trying to say that i should again install SIP and PyQt by downloading from sources(not from ubuntu repositories)... If u say yes then if i have to install it from the sources do i need to specify any --prefix options like in ./configure to install it to the directory

Re: [PyQt] Can't set icon on QTreeWidgetItem

2009-11-21 Thread Baz Walter
Filip Gruszczyński wrote: I am trying to set an icon on QTreeWidgetItem and I can't achieve this. The icon simply doesn't appear. The code is short: class MessageBoxSelect(QTreeWidget): def __init__(self, parent=None): QTreeWidget.__init__(self, parent)

Re: [PyQt] qbuttongroup problem

2009-11-21 Thread Baz Walter
Cucu Ionut wrote: Hi folks! I made a little script to provide the users an interface for entering some data stored in an sqlite file. At some point in my script I have some groupbuttons each with 4 radiobuttons created as follows class SGA(QtGui.QDialog): def __init_(...): snip

Re: [PyQt] Rich text in buttons

2009-11-21 Thread Baz Walter
Richard A. Litherland wrote: On Sat, 21 Nov 2009, Baz Walter wrote: Richard A. Litherland wrote: I'm very new to this, so I apologize if this question has been asked 1000 times before. The text property of QAbstractButton doesn't recognize HTML markup, but the developers of KCalc, at least

Re: [PyQt] Re: Capturing WindowChangeEvent in KDE

2009-11-14 Thread Baz Walter
Raja wrote: Im really struck on my original problem and not sure how to proceed. you need to post some runnable code that demonstrates the problem, and also say what platform you are on and what versions of qt, pyqt, etc you are using. ___ PyQt

Re: [PyQt] Old PyQt versions

2009-11-08 Thread Baz Walter
Guillaume Baty wrote: Hi, I'm looking for old PyQt 4.4.0 GPL sources, where can I found it ? Is there a public source repository for PyQt4 ? I have searched this information in faq, wiki and a part of mailing list archives without success ... AFAIK there is no archive of older versions.

Re: [PyQt] WaitCursor is ignored

2009-11-03 Thread Baz Walter
Mads Ipsen wrote: Hey, I want to display a widget as disabled (setEnabled(False)) with its cursor set to Qt.WaitCursor. Disabling the widget, however, always display the widget with a normal Qt.ArrowCursor if if the cursor is changed. How do I obtain a disabled widget with a Qt.WaitCursor?

  1   2   >