Re: [PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
Sat, Apr 13, 2013 at 6:52 PM, Christophe BAL wrote: > Hello, > can you give your solution ? > > Christophe. > > > 2013/4/14 Tom Brown > >> Ah! I found the QGraphicsView.mapToScene() method. This solved my problem. >> >> Thanks! >> Tom >> >>

Re: [PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
Ah! I found the QGraphicsView.mapToScene() method. This solved my problem. Thanks! Tom On Sat, Apr 13, 2013 at 6:06 PM, Tom Brown wrote: > I've found that this problem isn't specific to a bezier curve. If I change > the curve to a straight line, I observe the same problem. S

Re: [PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
2013 at 5:15 PM, Tom Brown wrote: > I've created a simple application (see below) that draws a bezier curve. I > want to give the user the ability to select the curve so they can move it > around. However, I'm having trouble selecting the curve in an intuitive > fashion. W

[PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
I've created a simple application (see below) that draws a bezier curve. I want to give the user the ability to select the curve so they can move it around. However, I'm having trouble selecting the curve in an intuitive fashion. When I click on the curve, the point I click on is actually far away

[PyQt] undefined reference to PyProperty_Type

2008-04-28 Thread Tom Brown
Hi, OS: Ubuntu 64bit Qt: qt-x11-opensource-src-4.4.0-rc1 sip: sip-4.7.5-snapshot-20080424 PyQt: PyQt-x11-gpl-4.4-snapshot-20080427 Qt and sip compiled/installed fine. The PyQt compile produced these errors: ... sipQtCorecmodule.o: In function `qtcore_pyqtproperty_traverse': sipQtCorecmodule.cpp

Re: [PyQt] Installation of PyQt4 in Windows

2007-08-01 Thread Tom Brown
On Tuesday 31 July 2007 15:48, Vláďa wrote: > Would it be possible to write a simple guide on installing PyQt in > Windows? This is a little old, but still relevant: http://iwiwdsmi.blogspot.com/2007/01/how-to-install-pyqt-41-python-25-and-qt_8340.html ___

Re: [PyQt] compiling sip on vista

2007-07-26 Thread Tom Brown
On Thursday 26 July 2007 11:52, Tom Brown wrote: > On Thursday 26 July 2007 11:41, b b wrote: > > yes, same error > > > > C:\sip-4.6>mingw32-make > > mingw32-make[1]: Entering directory `C:/sip-4.6/sipgen' > > makefile:29: warning: overriding commands f

Re: [PyQt] compiling sip on vista

2007-07-26 Thread Tom Brown
On Thursday 26 July 2007 11:41, b b wrote: > yes, same error > > C:\sip-4.6>mingw32-make > mingw32-make[1]: Entering directory `C:/sip-4.6/sipgen' > makefile:29: warning: overriding commands for target `.c.o' > makefile:26: warning: ignoring old commands for target `.c.o' > gcc -c -O2 -w -DUNICODE

Re: [PyQt] compiling sip on vista

2007-07-26 Thread Tom Brown
On Thursday 26 July 2007 10:45, b b wrote: > Hi, > thanks for the tip, but it helped not. > > b. When you run mingw32-make, do you get the same errors? What errors do you get if they are different? Thanks, Tom ___ PyQt mailing listPyQt@riverbankcom

Re: [PyQt] compiling sip on vista

2007-07-26 Thread Tom Brown
On Thursday 26 July 2007 06:00, b b wrote: [...] > C:\sip-4.6>make > makefile:29: warning: overriding commands for target `.c.o' > makefile:26: warning: ignoring old commands for target `.c.o' > mingw32-make[1]: Entering directory `C:/sip-4.6/sipgen' > gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT

Re: [PyQt] PSQL

2007-07-24 Thread Tom Brown
On Monday 23 July 2007 16:53, Tom Brown wrote: > On Monday 23 July 2007 16:45, David Boddie wrote: > > On Tue Jul 24 00:41:36 BST 2007, Tom Brown wrote: > > > > Ok, maybe I need to configure Qt with -plugins-sql-psql. I'm trying > > > > that out right now.

Re: [PyQt] PSQL

2007-07-23 Thread Tom Brown
On Monday 23 July 2007 16:45, David Boddie wrote: > On Tue Jul 24 00:41:36 BST 2007, Tom Brown wrote: > > > Ok, maybe I need to configure Qt with -plugins-sql-psql. I'm trying > > > that out right now. > > > > I've got this figured out. This is more

Re: [PyQt] PSQL

2007-07-23 Thread Tom Brown
On Monday 23 July 2007 10:43, Tom Brown wrote: > On Monday 23 July 2007 10:24, Tom Brown wrote: > > I have manually compiled the psql driver for Qt 4.3.0. I then compiled > > and installed SIP and PyQt4. Then I tried running my application: > > > > python -O test192cfm

Re: [PyQt] PSQL

2007-07-23 Thread Tom Brown
On Monday 23 July 2007 10:24, Tom Brown wrote: > I have manually compiled the psql driver for Qt 4.3.0. I then compiled and > installed SIP and PyQt4. Then I tried running my application: > > python -O test192cfm.py > QSqlDatabase: QPSQL driver not loaded > QSqlDatabase: availabl

[PyQt] PSQL

2007-07-23 Thread Tom Brown
I have manually compiled the psql driver for Qt 4.3.0. I then compiled and installed SIP and PyQt4. Then I tried running my application: python -O test192cfm.py QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available drivers: QSQLITE ... I am missing an essential step. Can anybody please t

Re: [PyQt] problem compiling SIP (20070714 snapshot) on Vista

2007-07-23 Thread Tom Brown
On Friday 20 July 2007 17:06, Tom Brown wrote: > 1) compiled Qt 4.3.0 > 2) manually compiled the psql driver in the Qt tree > 3) compiled SIP > 4) tried to install SIP, which failed > > 'mingw32-make install' in the SIP directory failed with these errors: > > C:\

[PyQt] problem compiling SIP (20070714 snapshot) on Vista

2007-07-20 Thread Tom Brown
Hi, I initially installed Qt 4.3.0, SIP (20070714 snapshot) and PyQt4 (20070714 snapshot) successfully into Windows Vista (32-bit). I ported my app from linux to Vista. Well, I copied it to Vista and ran it. The app came up fine with one exception, it needed the postgresql drivers for the Qt da

Re: [PyQt] QAbstractItemModel.setData() and emit

2007-07-19 Thread Tom Brown
On Thursday 19 July 2007 15:27, Andreas Pakulat wrote: > You don't need a full PostgreSQL installation, all you need is the > client library which is normally available as dll. Also you always need > that client lib no matter how you do the db access (i.e. Qt, some python > module...) I am using p

Re: [PyQt] QAbstractItemModel.setData() and emit

2007-07-19 Thread Tom Brown
On Thursday 19 July 2007 13:16, Andreas Pakulat wrote: > On 19.07.07 12:54:25, Tom Brown wrote: > > def index(self, row, column, parent): > > data = self.queryData[row][column] > > return self.createIndex(row, column, data) > > You don't need the internal

Re: [PyQt] Qt 4.3?

2007-07-19 Thread Tom Brown
On Thursday 19 July 2007 12:24, Hernán Rajchert wrote: > stable? if not how unstable :P > > On 7/19/07, Andreas Pakulat <[EMAIL PROTECTED]> wrote: > > On 19.07.07 15:38:28, Hernán Rajchert wrote: > > > When would the qt version 4.3 will be added? im looking for making > > > > wizards > > > > Fetch

Re: [PyQt] QAbstractItemModel.setData() and emit

2007-07-19 Thread Tom Brown
On Thursday 19 July 2007 10:41, Andreas Pakulat wrote: > On 19.07.07 09:14:20, Tom Brown wrote: > > On Wednesday 18 July 2007 15:40, Andreas Pakulat wrote: > > > On 18.07.07 14:58:11, Tom Brown wrote: > > > > Hi, > > > > > > > > I am using PyQ

Re: [PyQt] QAbstractItemModel.setData() and emit

2007-07-19 Thread Tom Brown
On Wednesday 18 July 2007 15:40, Andreas Pakulat wrote: > On 18.07.07 14:58:11, Tom Brown wrote: > > Hi, > > > > I am using PyQt4 with Qt 4.2.3. I have subclassed QAbstractItemModel to > > create a custom model for a custom combobox. I have overridden the > > setDa

[PyQt] QAbstractItemModel.setData() and emit

2007-07-18 Thread Tom Brown
Hi, I am using PyQt4 with Qt 4.2.3. I have subclassed QAbstractItemModel to create a custom model for a custom combobox. I have overridden the setData() method and keep getting this error: TypeError: invalid result type from ECBModel.setData() When I remove the call to emit(), the error goes a

Re: [PyKDE] Run function in the background

2007-02-19 Thread Tom Brown
On Mon, 2007-02-19 at 19:11 +0100, Fabian Steiner wrote: > Hello! > > I am currently working on an application which controls several hosts in > our network in order to ensure that there are online. This is done by a > function called checkStatus() that needs to be called every 10 seconds. > I

Re: [PyKDE] PyQt4-win-gpl-4-snapshot-20060719 error during compile

2006-09-03 Thread Tom Brown
On Sunday 03 September 2006 16:22, Tom Brown wrote: > I've installed PyQt4-win-gpl-4-snapshot-20060719 twice now on two different > machines. The installations went fine without any problems. Now, I'm > installing into a production machine and I get the make error below. The

[PyKDE] PyQt4-win-gpl-4-snapshot-20060719 error during compile

2006-09-03 Thread Tom Brown
I've installed PyQt4-win-gpl-4-snapshot-20060719 twice now on two different machines. The installations went fine without any problems. Now, I'm installing into a production machine and I get the make error below. The qt4 installation went fine and the sip installation went fine. Can anybody tel

[PyKDE] QComboBox.itemData() returns invalid QVariant

2006-08-30 Thread Tom Brown
Hi, I am running into trouble with QComboBox.itemData(). I can add an item with data to the combobox, but when I try to get the data back out, itemData() returns an invalid QVariant. For example: id = 1 self.addItem(rev, QVariant(id)) self.itemData(0).toInt() --> 0, False self.itemData(0).isVal

Re: [PyKDE] posting messages to another application

2006-08-13 Thread Tom Brown
On Thursday 10 August 2006 14:35, David Boddie wrote: > On Mon, 31 Jul 2006 20:35:18 -0700, Tom Brown wrote: > > I am using PyQt4. I would like to post keyboard messages to another > > application to control it programmatically. In my old windows days, > > I would someho

[PyKDE] posting messages to another application

2006-07-31 Thread Tom Brown
Hi, I am using PyQt4. I would like to post keyboard messages to another application to control it programmatically. In my old windows days, I would somehow (don't remember how exactly) get a hold of the list of applications, cycle through them until I found the one I wanted, then got an app/wi

Re: [PyKDE] QComboBox signals [SOLVED]

2006-05-02 Thread Tom Brown
On Tuesday 02 May 2006 18:07, Tom Brown wrote: > self.connect(self.ui.modelCB, SIGNAL('editTextChanged(const QString & > text)'), self.modelChanged) Doh! This was another stupid mistake. I just had to remove the argument name from the signal so it looks like this: self.con

[PyKDE] QComboBox signals

2006-05-02 Thread Tom Brown
I have connected just about all the signals of the QComboBox to a method in my main window. However, none of these methods are getting called. The combo box acts normally otherwise. Here is how I connect a signal: self.connect(self.ui.modelCB, SIGNAL('editTextChanged(const QString & text)'), s

Re: [PyKDE] QComboBox full but box is empty [SOLVED]

2006-05-02 Thread Tom Brown
My problem was solved by modifying the data() method of the StringsModel. This method needs to check for the EditRole as well as the DisplayRole as shown below. if role in [Qt.DisplayRole, Qt.EditRole]: return QVariant(self.strings[index.row()]) Thanks, Tom __

[PyKDE] QComboBox full but box is empty

2006-05-02 Thread Tom Brown
I have a QComboBox on my main window. I fill it with items using a model. I see the items in the drop down list. However, when I select an item, it does not show up in the box. When I call setCurrentIndex(0) the item at index 0 does not show up in the box. What am I doing wrong? Here is how I f

Re: [PyKDE] subclassing QAbstractListModel

2006-05-02 Thread Tom Brown
On Tuesday 02 May 2006 10:13, Andy Davidoff wrote: > What are you missing? Only this: > QAbstractListModel.__init__(self, parent) Doh! That was stupid (sigh). Thanks for pointing that out. ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de

[PyKDE] subclassing QAbstractListModel

2006-05-02 Thread Tom Brown
I am subclassing QAbstractListModel and getting an error in __init__(). Here is the code where I receive the error: class StringsModel(QAbstractListModel): def __init__(self, strings, parent=None): QAbstractListModel.__init__(parent) self.strings = strings When I run my application, th

Re: [PyKDE] scrollbars in QTextEdit do not work for me

2006-02-28 Thread Tom Brown
On Tuesday 28 February 2006 08:48, Tom Brown wrote: > On Monday 27 February 2006 16:44, Tom Brown wrote: > > On Monday 27 February 2006 16:39, Andreas Pakulat wrote: > > > Are you using PyQt3 or PyQt4? And also a minimal compilable example is > > > very helpful when repr

Re: [PyKDE] scrollbars in QTextEdit do not work for me

2006-02-28 Thread Tom Brown
On Monday 27 February 2006 16:44, Tom Brown wrote: > On Monday 27 February 2006 16:39, Andreas Pakulat wrote: > > Are you using PyQt3 or PyQt4? And also a minimal compilable example is > > very helpful when reproducing this. > > > > I can't reproduce this with PyQt

Re: [PyKDE] scrollbars in QTextEdit do not work for me

2006-02-27 Thread Tom Brown
On Monday 27 February 2006 16:39, Andreas Pakulat wrote: > Are you using PyQt3 or PyQt4? And also a minimal compilable example is > very helpful when reproducing this. > > I can't reproduce this with PyQt4 and a small example that fills the > QTextEdit after showing it... I am using PyQt3. I will

[PyKDE] scrollbars in QTextEdit do not work for me

2006-02-27 Thread Tom Brown
Hi, I have created a QTextEdit to show the output from a serial port. I read one character at a time from the serial port and insert one character at a time into the QTextEdit. The vertical scrollbar does not show up after the widget has filled up and it has scrolled down a number of lines. I c

[PyKDE] widget like KMail's message list

2005-08-25 Thread Tom Brown
Hi, What widget are they using for the message list in KMail? I need one just like that for a game to show a list of players, their rank and status. It looks like QListBox doesn't have the multicolumn functionality that I am looking for. It allows for multiple columns but only for displaying

[PyKDE] QDialog and multiple buttons

2005-08-02 Thread Tom Brown
Hi, I would like to create a dialog with three buttons: 'Heads', 'Tails', and 'Cancel'. If I only had the 'Heads' and 'Tails' buttons then my life would be easy. I would just connect the 'Heads' button up to the accept() slot and connect the 'Tails' button up to the reject() slot. What do I do