pyqt

How to resize QInputDialog, PyQt

I am getting input with this here areaInput = QtGui.QInputDialog.getText(self, "Copy Area", "New Area Name:", 0) However I would like to make the dialog box larger, I've tried things such as QtGui.QInputDialog.resize(400, 400) However it says "the first argument must be a QWidget class" and I'm not quite sure what this means or how...

video player with qt phonon (using python)

hi, I am working on Windows xp and am trying to get a simple video player running. I am trying to use Phonon::VideoPlayer module for this. I am connecting the signal as connect(self.player,SIGNAL("finished()"),self.player.deleteLater) and then , when the Play button is pressed, it makes the following call: self.player.play(Phono...

Problem in understanding connectSlotsByName() in pyqt???

Hi all, I couldn't understand the connectSlotsByName() method which is predominently used by pyuic4.. As far the class is single in a PyQt file it's ok since we can use self which will be associated with a single object throughout.. But when we try to use various classes from different files the problem and the need to use connectSlotsB...

'C++ object destroyed' in QComboBox descendant editor in delegate

Hi, all! I have modified combobox to hold colors, using QtColorCombo (http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Widgets/qtcolorcombobox) as howto for the 'more...' button implementation details. It works fine in C++ and in PyQt on linux, but I get 'underlying C++ object was destroyed' when use this control in PyQt on ...

PyQt and unittest - how to handle signals and slots

Hello, some small application I'm developing uses a module I have written to check certain web services via a REST API. I've been trying to add unit tests to it so I don't break stuff, and I stumbled upon a problem. I use a lot of signal-slot connections to perform operations asynchronously. For example a typical test would be (pseudo-...

How to display a QGraphicsScene?

I've got the following code and I'm not sure how to add the QGraphicsScene to my layout.. class MainForm(QDialog): def __init__(self, parent=None): super(MainForm, self).__init__(parent) self.scene = QGraphicsScene(self) self.scene.setSceneRect(0, 0, 500, 500) self.view = QGraphicsView() self....

Latitude/Longitude Qt4 widget?

What is the best starting point for a Qt4 widget for entering Latitude/Longitude in DD:MM:SS format (degrees, minutes, seconds)? Customize a QLineEdit? A series of spin boxes? ...

Python PyQt Timer Firmata

Hello. I am pretty new to python and working with firmata I am trying to play around with an arduino . Here is what I want to happen: Set arduino up with an LED as a digital out Set potentiometer to analog 0 Set PyQt timer up to update potentiometer position in application Set a threshold in PyQt to turn LED on (Analo...

QTreeWidget insertTopLevelItem - index given not accurately displayed in Tree?

I am unable to properly insert a QTreeWidgetItem at a specific index, in this case I am removing all QTreeWidgetItems from the tree, doing a custom sort on their Date Objects and then inserting them back into the QTreeWidget. However, upon inserting (even one at a time) the QTreeWidgetItem is not inserted into the correct place. The ...

PyQt error: No such signal QObject::dataChanged

PyQt application works fine, but when I close it Python shows this message: "Object::connect: No such signal QObject::dataChanged(QModelIndex,QModelIndex)" What is the cause of this? There isn't dataChanged signal in the program. EDIT: Almost minimal program which causes error: import sys from PyQt4.QtCore import * from PyQt4.QtGui imp...

PyQt QDataWidgetMapper submit doesn't work

Here is the parts of code (Mw - main window, Ed - edit dialog, Tv - table view): Mw.mapper = QDataWidgetMapper(Mw) Mw.mapper.setSubmitPolicy(QDataWidgetMapper.ManualSubmit) Mw.mapper.setItemDelegate( QSqlRelationalDelegate(Mw.mapper) ) Mw.mapper.setModel(Table.Model) # Id - first invisible key column Mw.mapper.addMapping(Ed.leName, Name...

pyQt4: QWidget subclass not responding to new setStyleSheet() background colour

I am having an issue with PyQt4. I want to create a new widget within a window, and I want this widget to have a custom color. When i create a subclass of the QWidget class, and instantiate it, I am not able to change its background color through the setStyleSheet() function. When I instantiate a new QWidget object, I have no problem...

Signals and slots in PyQt

In the past I've had some experience of Qt in C++. I've now started using PyQt, and finding it a bit bewildering. There doesn't seem to be any definitive source of documentation, apart from a small amount at Riverbank. I guess the first thing I'd like to know is that there's an initial hump with PyQt, and it does get easier. [Edit: The m...

how to create multiple selections in text edit box in qt4?

Qt3.3 used to allow for multiple selections in the QTextEdit widget by calling the setSelection() function and specifying a different selection id (selNum) as the last argument in that function. In Qt4, to create a selection, I do it by creating a QTextCursor object and call the setPosition() or movePosition() methods. I have no proble...

How to install PyQt on Mac OS X 10.6.

Hello all, I'm quite new to Mac OS X. when i tried to install PyQt on Mac Os X after installing python 3.1, Qt 4.6.2 and SIP 4.10.1 i encounter the following error when i execute $python3 configure.py command. Determining the layout of your Qt installation... This is the GPL version of PyQt 4.7 (licensed under the GNU General Public Li...

Sending custom PyQt signals?

I'm practicing PyQt and (Q)threads by making a simple Twitter client. I have two Qthreads. Main/GUI thread. Twitter fetch thread - fetches data from Twitter every X minutes. So, every X minutes my Twitter thread downloads a new set of status updates (a Python list). I want to hand this list over to the Main/GUI thread, so that it can...

QFileDialog and german umlaute within a path

Hey Everybody, i am working on a project, which i am developing with Python and PyQT4. I have stumbled upon a somewhat odd behaviour of the QFileDialog, that is not occuring when running the project within in my IDE (Eclipse). The problem is that QFileDialog in ExistingFiles-mode does fail to return the list of selected files, when one...

Deploying a PyQt application on Windows Vista x64

I'm working on an application for a client/friend using PyQt. I've been working on Linux and testing on Vista, but the target computer is Vista x64. Now, Python comes with compiled binaries of Python 2.6 for 64 bit Windows, but Riverbank don't provide 64 bit binaries for PyQt. I don't have much access to the target computer, so I can't ...

PyQt WebKit CSS background image not showing

I'm making a Twitter client with PyQt, which uses WebKit to draw the tweet list. Now I'm trying to use CSS to set a background image in the WebKit widget - but the image won't show up. This is the relevant part of the CSS: body { ...

create app that has plugin which contains PyQt widget

I'm writing an application that will use plugins. In the plugin I want to include a widget that allows the options for that plugin to be setup. The plugin will also include methods to operate on the data. What is is the best way to include a widget in a plugin? Below is pseudo code for what I've tried to do. My original plan was to ...