Re: [PyQt] button delegate in a tableview

2013-01-30 Thread Mads Ipsen
Hi, You could consider using setIndexWidget() on the TableView. But some care should be taken if you also use a QSortFilterProxyModel for filtering your data. Best, Mads On 01/30/2013 11:32 AM, Cristobal Infante wrote: Hi, Sorry to bump this thread again. I am almost done with my PYQT

Re: [PyQt] Resizing index widgets

2013-01-30 Thread Mads Ipsen
approach. Best regards, Mads On 01/30/2013 07:11 PM, Detlev Offenbach wrote: Hi Mads, why are you using QTreeView? I would use QToolbox for such a layout. Regards, Detlev On Tuesday 29 January 2013, 22:31:14 Mads Ipsen wrote: Hi, We develop a tool for manipulating atomic structures

Re: [PyQt] HeightForWidth label

2013-01-10 Thread Mads Ipsen
Dear Pete, Thanks a lot for your input. To some extend its too bad that this feature cannot be implemented in a proper fashion - especially when the documentation of Qt tells you that it can. Best regards, Mads On 09/01/2013 22:00, Hans-Peter Jansen wrote: Dear Mads, Am Mittwoch, 9

[PyQt] Size for hint label

2013-01-09 Thread Mads Ipsen
height. But this also gives rise to some weird layout behavior. If anybody has any good suggestions on how to approach this, please let me know. I attach a small snippet that reproduces the layout resizing behavior. Best regards, Mads

[PyQt] Python generated file changes not detected by QFileSystemModel

2012-05-22 Thread Mads Ipsen
in an external editor. Write some stuff. Save. Write more stuff. Save. If you do (3), the dataChanged signal is NOT emitted. However, if you do (4), the dataChanged signal IS emitted. Any clues? An attached file that reproduces the issue is attached. Best regards, Mads

[PyQt] Widget over modal dialog

2012-05-15 Thread Mads Ipsen
. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45

Re: [PyQt] Unit testing PyQt applications

2012-03-14 Thread Mads Ipsen
() to test that the QFileDialog was called Finally clean up and reinsert the old exec_ method. QtGui.QFileDialog.exec_ = new.instancemethod(old_exec, None, QtGui.QFileDialog) Makes sense? On 07/03/2012 18:13, Andreas Pakulat wrote: On 07.03.12 15:42:34, Mads Ipsen wrote: OK, I agree

[PyQt] Setting icon size on a header view

2012-03-14 Thread Mads Ipsen
? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388

[PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
On 07/03/2012 09:43, Luca Beltrame wrote: In data mercoledì 7 marzo 2012 09:37:38, Mads Ipsen ha scritto: the Python unittest moudle. I have attached a few examples. If you have time to take a look and comment, it would be great. I have a question on FooTest: is having a QApplication instance

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
7 marzo 2012 09:37:38, Mads Ipsen ha scritto: the Python unittest moudle. I have attached a few examples. If you have time to take a look and comment, it would be great. I have a question on FooTest: is having a QApplication instance enough in unittest to ensure emission of signals? Otherwise

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
On 07/03/2012 09:43, Luca Beltrame wrote: In data mercoledì 7 marzo 2012 09:37:38, Mads Ipsen ha scritto: the Python unittest moudle. I have attached a few examples. If you have time to take a look and comment, it would be great. I have a question on FooTest: is having a QApplication instance

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
. * What would be the proper way of unit testing this? * How should starting/stopping the event loop be handled? Best regards, Mads On 07/03/2012 10:51, Andreas Pakulat wrote: On 07.03.12 09:37:38, Mads Ipsen wrote: Hi, I have a general question about how to unit test PyQt applications using

[PyQt] TableView - activated signal

2012-02-21 Thread Mads Ipsen
the issue. So run the example and try to tell me why the activated signal is NOT triggered when a cell is clicked, double-clicked, entered etc. Best regards, Mads -- +-+ | Mads Ipsen

Re: [PyQt] TableView - activated signal

2012-02-21 Thread Mads Ipsen
On 21/02/2012 15:32, Mateusz Korniak wrote: On Tuesday 21 of February 2012, Mads Ipsen wrote: (...) I attach a snippet that reproduces the issue. So run the example and try to tell me why the activated signal is NOT triggered when a cell is clicked, double-clicked, entered etc. I get handlers

Re: [PyQt] TableView - activated signal

2012-02-21 Thread Mads Ipsen
On 21/02/2012 16:47, Mateusz Korniak wrote: On Tuesday 21 of February 2012, Mads Ipsen wrote: On 21/02/2012 15:32, Mateusz Korniak wrote: On Tuesday 21 of February 2012, Mads Ipsen wrote: (...) I attach a snippet that reproduces the issue. So run the example and try to tell me why

[PyQt] activated signal

2012-02-17 Thread Mads Ipsen
, QtCore.SIGNAL('doubleClicked(const QModelIndex )'), self.tableActivated) the method is called when a cell is double-clicked. What am I doing wrong? Mads -- +-+ | Mads Ipsen

[PyQt] Hardcoded fonts in Qt designer

2011-11-30 Thread Mads Ipsen
and chop out body style=font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; Best regards, Mads -- +-+ | Mads Ipsen

[PyQt] Drag icons in QFileDialog

2011-09-23 Thread Mads Ipsen
start digging in order to control the displayed drag icons? Best regards, Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Word wrap in QLabel - strange resizing

2011-08-22 Thread Mads Ipsen
Hi, If you set wordWrap to True for a QLabel in widget the layout, the resizing of the widget is kinda strange: The widget can be resized to nothing etc. I've attached a small example, displaying two widgets: One with and one without wordwrap. This must be a bug, right? Best regards, Mads

[PyQt] Word wrap in QLabel - strange resizing - rephrased

2011-08-22 Thread Mads Ipsen
widgets which both include a QLabel: one with wordwrap on, and one without. Try to resize the two widgets and see if you can reproduce the behavior. This must be a bug, right? Best regards, Mads import sys from PyQt4 import QtCore, QtGui class Label(QtGui.QLabel): Class for defining

Re: [PyQt] Word wrap in QLabel - strange resizing - rephrased

2011-08-22 Thread Mads Ipsen
Thanks. It seems strange to me though, that something like this even can be an issue, in the sense that it haven't been fixed ages ago. But maybe it isn't as trivial as it looks? Mads On 08/22/2011 12:39 PM, Jeremy Sanders wrote: Mads Ipsen wrote: I've attached a small example

[PyQt] Screenshot with no show

2011-06-21 Thread Mads Ipsen
is there any way that you can * Show/display a GLWidget/QWidget in some sort of virtual frame buffer, in such a way that is does NOT appear visual to the user. * Dump the contents of the invisible window into a pixmap. Best regards, Mads ___ PyQt

[PyQt] Position widgets over widgets

2011-04-07 Thread Mads Ipsen
widget. However, the label positioned by this approach is always obscured by the widget which was added to the layout. I want it to appear as visible, i.e. visible on top of the parent widget. Any clues? Best regards, Mads import sys from PyQt4 import QtGui class Widget(QtGui.QWidget): def

Re: [PyQt] Position widgets over widgets

2011-04-07 Thread Mads Ipsen
. This QPushButton is rendered useless (i.e.) you cannot press it. I thought solving this problem would be a walk in the park. Any clues? Best regards, Mads On 2011-04-07 15:19, Hans-Peter Jansen wrote: On Thursday 07 April 2011, 14:58:30 Mads Ipsen wrote: Hi, I have attached a simple example

[PyQt] QTextEdit 80 chars wide

2011-01-27 Thread Mads Ipsen
Hi, Suppose I have a QTextEdit set up with a monospace font. How do I make the text edit field exactly 80 chars wide? E.g. similar to a command prompt window. Best regards, Mads -- +--+ | Mads Ipsen, Scientific developer

[PyQt] GMail

2010-12-08 Thread Mads Ipsen
Hi, If I post a message in the mailing list from my gmail account, my own post does not appear in my inbox. Has anybody here experienced a similar problem? Best regards, Mads -- +--+ | Mads Ipsen, Scientific developer

[PyQt] Select text in QMessageBox

2010-07-01 Thread Mads Ipsen
How do I make the text selectable (for mouse copy and paste) in a QMessageBox? On Linux, it works by default, but on windows, the text cannot be selected. Any clues? Best regards, Mads -- +--+ | Mads Ipsen, Scientific developer

Re: [PyQt] Overpainting example does not work

2010-04-20 Thread Mads Ipsen
, 0, 0, 127)) Best regards, Mads David Boddie wrote: On Mon Apr 19 20:55:32 BST 2010, Mads Ipsen wrote: The overpainting example does not work on my computer - no bubbles nor text is painted on top of the OpenGL scene. Anybody that can confirm this? Can you give some details about

[PyQt] Overpainting example does not work

2010-04-19 Thread Mads Ipsen
Hey, The overpainting example does not work on my computer - no bubbles nor text is painted on top of the OpenGL scene. Anybody that can confirm this? Best regards, Mads -- +-+ | Mads Ipsen, Scientific developer

[PyQt] Show selected rows

2010-03-16 Thread Mads Ipsen
Dear Gurus, Suppose I have a table model that I view in a QTableView (A). In another QTableView (B) I want to display the rows that are selected in the first QTableView (A). How do I achieve this? Ie, each selected row in view (A) should be displayed in view (B). Best regards, Mads

Re: [PyQt] Disposing of a QApplication

2010-03-12 Thread Mads Ipsen
believe this makes QT_APP a single object. Best regards, Mads -- +-+ | Mads Ipsen, Scientific developer| +---+-+ | QuantumWise A/S | phone

[PyQt] QString looks strang in online docs

2010-01-25 Thread Mads Ipsen
Doesn't QString look a little strange here: http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvalidator.html#fixup-2 -- +-+ | Mads Ipsen, Scientific developer

[PyQt] fixup in QValidator

2010-01-25 Thread Mads Ipsen
Hi, I can't figure out how to use/implement the fixup() method of a QValidator. Any suggestions? Best regards, Mads -- +-+ | Mads Ipsen, Scientific developer

[PyQt] Uppercase QLineEdit

2010-01-25 Thread Mads Ipsen
in-place?Uppercase Any help/directions are welcome. Best, Mads -- +-+ | Mads Ipsen, Scientific developer| +---+-+ | QuantumWise A/S | phone

[PyQt] qlistview and setSelectionRectVisible

2010-01-17 Thread Mads
Hi, when I use a qlistview I can toggle the 'selection rectangle' on/off with setSelectionRectVisible(..). But how do I change the look (outline, color, etc) of the selection rectangle? Thanks, Mads ___ PyQt mailing listPyQt@riverbankcomputing.com

[PyQt] Treeview with exclusive checkboxes - used to work

2010-01-08 Thread Mads Ipsen
self.setModel(self._model) if __name__ == __main__: app = QtGui.QApplication(sys.argv) widget = View() widget.show() sys.exit(app.exec_()) -- +-+ | Mads Ipsen, Scientific developer

Re: [PyQt] Getting a couple errors when I try and start a QMainWindow from a QMainWindow

2010-01-08 Thread Mads Ipsen
dizou wrote: Solved this. How? -- +-+ | Mads Ipsen, Scientific developer| +---+-+ | QuantumWise A/S | phone: +45-29716388

[PyQt] Always on top on windows

2010-01-05 Thread Mads Ipsen
with its own frame etc. * On Linux, the parent and child can be active completely independent of other. * On XP, the child is always on top of the parent window. The XP behavior is dead annoying. Any suggestions on how to get rid of tis'? Best regards, Mads Minimal example app included

[PyQt] qgraphicsitem not cleared before paint(...) ?

2010-01-03 Thread Mads
I need to call? I have attached the code. The following link points to an image showing the selections not being cleared: http://img263.imageshack.us/img263/6339/marker.png. Thanks! Best regards, Mads import sys, math from PyQt4.QtGui import * from PyQt4.QtCore import * class SelectionMarker

Re: [PyQt] qgraphicsitem not cleared before paint(...) ?

2010-01-03 Thread Mads
Well, to answer my own question: calling SelectionMarker.SetVisible(False) when clearing the selection and SelectionMarker.SetVisible(True) before painting does the trick. If anybody has some clarifications as to why this is needed - please feel free to comment. Best regards, Mads On Sun, Jan

Re: [PyQt] qgraphicsitem not cleared before paint(...) ?

2010-01-03 Thread Mads
Well, I should read the documentation more carefully to clarify my own ramblings: SetVisible(...) should not be called, but prepareGeometryChange() should be called *before* changing the bounding rectangle. /M On Sun, Jan 3, 2010 at 5:21 PM, Mads madsornom...@gmail.com wrote: Well

[PyQt] Object::disconnect: Unexpected null parameter

2009-11-27 Thread Mads Ipsen
to look for. Any clues? Best regards, Mads -- +-+ | Mads Ipsen, Scientific developer| +---+-+ | QuantumWise A/S | phone: +45

Re: [PyQt] Error when double clicking

2009-11-17 Thread Mads Ipsen
() sys.exit(app.exec_()) -- +-+ | Mads Ipsen, Scientific developer| +---+-+ | QuantumWise A/S | phone: +45-29716388 | | Nørre Søgade

Re: [PyQt] insert a radio button in menu of menubar

2009-11-12 Thread Mads Ipsen
. -- +-+ | Mads Ipsen, Scientific developer| +---+-+ | QuantumWise A/S | phone: +45-29716388 | | Nørre Søgade 27A | www

[PyQt] WaitCursor is ignored

2009-11-03 Thread Mads Ipsen
that reproduces the problem is shown below. Best regards, Mads import sys from PyQt4 import QtCore, QtGui if __name__ == __main__: app = QtGui.QApplication(sys.argv) widget = QtGui.QWidget() widget.show() widget.setEnabled(False) cursor = QtGui.QCursor(QtCore.Qt.WaitCursor

Re: [PyQt] WaitCursor is ignored

2009-11-03 Thread Mads Ipsen
Baz Walter wrote: 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

Re: [PyQt] pyuic : backslash escaping with untranslatable strings

2009-11-03 Thread Mads Ipsen
Mads Ipsen wrote: Felix Schmidt wrote: Hi, I got the following bug (or Feature?) in pyuic : With Qt Designer I created a QLineEdit with inputMask set to \0\x;_ (to input a hex-value like 0x12AB). So far it's fine. But when I uncheck the translatable flag of this inputMask (don't want

Re: [PyQt] pyuic : backslash escaping with untranslatable strings

2009-11-03 Thread Mads Ipsen
9.04 with Qt 4.5.2. But it works on Mac OS X with Qt 4.6.0-beta and XPSP3 with Qt 4.3.3. I believe its a Qt bug. Mads -- +-+ | Mads Ipsen, Scientific developer

[PyQt] Block for interactions

2009-10-30 Thread Mads Ipsen
by a modal dialog. Is this just calling setEnabled(False) or is there some more specific method? A blocked widget look different from a disabled widget. Best regards, Mads -- +-+ | Mads Ipsen, Scientific developer

[PyQt] Wrong cursor

2009-10-29 Thread Mads Ipsen
The script below should display a QWidget with a Qt::SizeAllCursor. Instead it displays a Qt::ClosedHandCursor. Bug? System information Linux Python 2.6.1 Qt 4.5.2 PyQt 4.5.4 Mads import sys from PyQt4 import QtCore, QtGui if __name__ == __main__: app = QtGui.QApplication(sys.argv

[PyQt] QValidator raises TypeError

2009-10-20 Thread Mads Ipsen
Below is included a simple example that always returns QtGui.QValidator.Acceptable. Nevertheless, the programs raises the error TypeError: invalid result type from Validator.validate() no matter what you type in the line edit. Any suggestions? Best, Mads import sys from PyQt4 import QtGui

Re: [PyQt] QValidator raises TypeError

2009-10-20 Thread Mads Ipsen
Phil Thompson wrote: On Tue, 20 Oct 2009 13:01:01 +0200, Mads Ipsen m...@comxnet.dk wrote: I am trying to implement a simple validator for a QLineEdit. To do this you should inherit from QtGui.QValidator and overload the method validate(). The validate method should then return either

[PyQt] PyQt 4.6 build wanings

2009-10-17 Thread Mads Ipsen
/QtCore/qdatetime.sip:55: warning: deprecated conversion from string constant to ‘char*’ -- +-+ | Mads Ipsen, Scientific developer| +---+-+ | QuantumWise

[PyQt] QMessageBox does not get focus

2009-09-27 Thread Mads Ipsen
When I launch a QMessageBox like below, from a QMainWindow the box does not have keyboard focus (its not the active window), implying that the key-shortcuts cannot be used. Any fixes or suggestions? Mads QtGui.QMessageBox.warning(self, 'Some title', self.tr

Re: [PyQt] QMessageBox does not get focus

2009-09-27 Thread Mads Ipsen
Mads Ipsen wrote: When I launch a QMessageBox like below, from a QMainWindow the box does not have keyboard focus (its not the active window), implying that the key-shortcuts cannot be used. Any fixes or suggestions? Mads QtGui.QMessageBox.warning(self, 'Some title

[PyQt] Menu bar entry name - suggestions?

2009-09-25 Thread Mads Ipsen
. An equivalent is the 'Windows' menu entry that display a list of all currently open windows. Any good suggestions are most welcome. Mads -- ++ | Mads Ipsen, Scientific developer

[PyQt] Segmentation fault in keyPressEvent

2009-09-17 Thread Mads Ipsen
. Sys info: Ubuntu 8.04 Qt 4.5.2 PyQt 4.5.4 -- ++ | Mads Ipsen, Scientific developer | +--+-+ | QuantumWise A/S | phone: +45-29716388

[PyQt] Error in example script

2009-09-09 Thread Mads Ipsen
().sampleBuffers(): QMessageBox.information(None, OpenGL samplebuffers, This system does not have sample buffer support.) sys.exit(0) The calls to the static method 'QMessageBox.information' should be replaced by QtGui.QMessageBox.information Best regards, Mads

[PyQt] headerDataChanged

2009-08-20 Thread Mads Ipsen
( Qt::Orientation orientation, int first, int last ) but I don't know how to convert that to Python syntax. Best regards, Mads -- ++ | Mads Ipsen, Ph.D, Scientific software developer

Re: [PyQt] Selecting several table items

2009-08-20 Thread Mads Ipsen
Mads Ipsen wrote: Hi, Ho do I programmatically select several items in a QTableView? I can select one element by calling the method setCurrentIndex(), but that only selects a single item. I need to do this in order to write a proper unit test. Best regards, Mads Hi, Solved this one

[PyQt] detecting different events

2009-07-28 Thread Mads
, but when I'm moving over a new Item I will like to detect that I'm hovering over the Item. My problem is that when I have the mouse pressed I can't evoke the hoverEnterEvent. So my question is how do I get the hoverEnterEvent to be called during my mouseMoveEvent? Thanks, Mads

Re: [PyQt] Which QStyle

2009-07-22 Thread Mads Ipsen
Matt Newell wrote: On Tuesday 21 July 2009 13:46:09 Mads Ipsen wrote: How do I programatically determine which style I am using, i.e. whether it's QWindowsStyle, QMacStyle, QMotifStyle etc. style = QApplication.instance().style() print style.metaObject().className() Matt Thanks

[PyQt] Which QStyle

2009-07-21 Thread Mads Ipsen
How do I programatically determine which style I am using, i.e. whether it's QWindowsStyle, QMacStyle, QMotifStyle etc. -- ++ | Mads Ipsen, Ph.D, Scientific software developer

Re: [PyQt] Pressing enter in QLineEdit clicks QPushButton?

2009-06-23 Thread Mads Ipsen
projetmbc wrote: Mads Ipsen a écrit : If you change 'QDialog' to 'QWidget' the problem disappears. But I have no idea why. Anybody? Best regards, Mads In the first example proposed that did not work, you can see that the button has the focus even if the cursor is in the lineedit. I think

Re: [PyQt] Pressing enter in QLineEdit clicks QPushButton?

2009-06-22 Thread Mads Ipsen
for help, Sibylle Can you supply a simple example that reproduces the behavior? Best regards, Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Pressing enter in QLineEdit clicks QPushButton?

2009-06-22 Thread Mads Ipsen
Sibylle Koczian wrote: Mads Ipsen m...@comxnet.dk schrieb: Sibylle Koczian wrote: Hello, I've got a dialog with a QLineEdit and a QPushButton. The QLineEdit is connected to a method which takes its text and appends it to a QTextBrowser (that's taken from the first GUI example

Re: [PyQt] problem with mouseDoubleClickEvent on QTreeView 1

2009-06-21 Thread Mads Ipsen
inherit from the classes correctly. In your case, you should inherit from the QTreeView class and then overload the method mouseDoubleClickEvent(). This snippet below works. Best regards, Mads import sys from PyQt4 import QtGui class DirView(QtGui.QTreeView): def __init__(self, parent =None

Re: [PyQt] SOLVED Dragging a QGraphicsItem from a QListView

2009-06-17 Thread Mads
I forgot to have a reference to the scene... Thanks From: Mads kofo...@yahoo.com To: pyqt@riverbankcomputing.com Sent: Tuesday, June 16, 2009 4:46:27 PM Subject: Re: [PyQt] Dragging a QGraphicsItem from a QListView I forgot to add the right code. I have

[PyQt] Dragging a QGraphicsItem from a QListView

2009-06-16 Thread Mads
() it is being called and calls the graphicsitem, but it is not shown on screen. What am I doing wrong? Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Dragging a QGraphicsItem from a QListView

2009-06-16 Thread Mads
I forgot to add the right code. I have attached the drag and drop events of the graphicsview and the list. Executing this code I don't get any errors, but nothing is shown on screen. I hope someone can explain what I'm doing wrong. Mads From: Mads kofo

[PyQt] Empty style sheet changes QLineEdit

2009-06-12 Thread Mads Ipsen
visible. Qt 4.5.1, PyQt 4.4.4, Ubuntu 8.04 Best regards, Mads import sys from PyQt4 import QtCore, QtGui if __name__ == __main__: app = QtGui.QApplication(sys.argv) style_sheet = 'QLineEdit {}' line_edit = QtGui.QLineEdit() line_edit.setStyleSheet(QtCore.QString(style_sheet

[PyQt] QApllication changes the locale

2009-06-08 Thread Mads Ipsen
in the application we are developing. Adding the line os.putenv('LANG', 'en_US.UTF-8') before the QApplication is loaded solves the problem - but should this really happen? Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http

[PyQt] QSortFilterProxyModel - AttributeError

2009-06-05 Thread Mads Ipsen
Hi, The script below fails with PyQt-4.4.4 qt-4.5.1 giving the error: Traceback (most recent call last): File simple.py, line 14, in module print proxy_model.sortColumn() AttributeError: sortColumn Am I missing something here? Best regards, Mads import sys from PyQt4 import QtCore

Re: [PyQt] QSpinBox: behavior on Linux

2009-06-04 Thread Mads Ipsen
regards, Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Simple connect does not work

2009-04-24 Thread Mads Ipsen
Hi, I am puzzled why the connection used in the example below does not work. I get the error: Object::connect: No such slot SpinBox::foo(int) Example snippet: import sys from PyQt4 import QtCore, QtGui class SpinBox(QtGui.QSpinBox): def __init__(self, parent=None):

Re: [PyQt] Simple connect does not work

2009-04-24 Thread Mads Ipsen
Hi, I am puzzled why the connection used in the example below does not work. I get the error: Object::connect: No such slot SpinBox::foo(int) Example snippet: import sys from PyQt4 import QtCore, QtGui class SpinBox(QtGui.QSpinBox): def __init__(self, parent=None):

Re: [PyQt] Simple connect does not work

2009-04-24 Thread Mads Ipsen
On Friday 24 April 2009, Mads Ipsen wrote: OK, I need to use a signature (see below). Sorry for bothering you! class SpinBox(QtGui.QSpinBox): def __init__(self, parent=None): QtGui.QSpinBox.__init__(self, parent) @QtCore.pyqtSignature(int) def foo(self, i

Re: [PyQt] splitting windows

2009-04-24 Thread Mads
I found a solution for this, QSplitter works fine for me. thanks From: Mads kofo...@yahoo.com To: pyqt@riverbankcomputing.com Sent: Thursday, April 23, 2009 5:19:53 PM Subject: [PyQt] splitting windows Hi all I have an application with a Graphicsscene

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

2009-04-23 Thread Mads Ipsen
) ... Best regards, Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] splitting windows

2009-04-23 Thread Mads
in different views and zoom levels. So my question is, is it possible to add such a feature to the scene, and which way is the best way to proceed? hope anyone have some good ideas. Thanks in advance Mads ___ PyQt mailing listPyQt

Re: [PyQt] Re: Connecting two QGraphicsItems

2009-04-09 Thread Mads
Thanks for the replies. Using setParent works fine for one item, but is it possible to control the position of the item? I mean is it possible to place the EllipseItem at a certain point on the GraphicsItem, so the EllipseItems don't get placed at the same point. Mads - Original

Re: [PyQt] Connecting two QGraphicsItems

2009-04-06 Thread Mads
--- | | | | --- each item needs to have separate functionality, so you should be able to set different attributes on each item. Is the createItemGroup, still the best way forward? thanks mads - Original Message From: Marcell Mars marcell.m...@gmail.com To: pyqt@riverbankcomputing.com Sent

Re: [PyQt] Larger size of QIcon?

2009-03-25 Thread Mads Ipsen
... the thumbnails (QIcons) are very small - how do I make them larger? Code is attached. Thanks! Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt like this: list_view = QListView

Re: [PyQt] Larger size of QIcon?

2009-03-25 Thread Mads
On Wed, Mar 25, 2009 at 9:10 AM, Mads Ipsen m...@comxnet.dk wrote: like this: list_view = QListView() list_view.setIconSize(QSize(1024,1024)) Thanks! -Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com

[PyQt] Larger size of QIcon?

2009-03-24 Thread Mads
... the thumbnails (QIcons) are very small - how do I make them larger? Code is attached. Thanks! Mads #! /usr/bin/env python from PyQt4.QtGui import * from PyQt4.QtCore import * import sys TITLE = 'ThumbGridWidget' THUMBWIDTH = 64 PICS = ['Elvis1.jpg', 'Elvis2.jpg', 'Elvis3.jpg', 'Elvis4.jpg']*4 black

Re: [PyQt] QTableView header connection

2009-03-18 Thread Mads Ipsen
://www.riverbankcomputing.com/mailman/listinfo/pyqt You should use the method horizontalHeader() not horizontalHeader when you connect. The signal you should connect to is 'sectionClicked (int)', I have included a small example below that hopefully should get you going. Best, Mads import sys from PyQt4

Re: [PyQt] subprocess in PyQt

2009-03-14 Thread Mads Ipsen
a QProcess from spawning external processes? I have a good success ratio with that approach. Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] subprocess in PyQt

2009-03-14 Thread Mads Ipsen
Mads Ipsen-3 wrote: Hello guys; i have a function that suppose to do something and from terminal it has this syntax to be executed; was...@home:~/Desktop/Project2/GUI$ python myexif.py -q pathfile test.csv so far on using subprocess i came up with this; from subprocess import

[PyQt] how to subclass an instance from a generated ui-class?

2009-03-14 Thread Mads Kristiansen
, Mads * The generated class with comments added ** *# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'imageviewer.ui' # # Created: Sat Mar 14 11:08:43 2009 # by: PyQt4 UI code generator 4.3.3 # # WARNING! All changes made in this file will be lost

[PyQt] Re: how to subclass an instance from a generated ui-class?

2009-03-14 Thread Mads
Hm, I think I found out. You simply 'promote' it in the designer, right? Thanks, Mads Mads Kristiansen madsornomads at gmail.com writes: [snip] ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo

Re: [PyQt] Connecting to a QItemModel

2009-03-06 Thread Mads Ipsen
) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt I believe you should do: self.connect(self.model, QtCore.SIGNAL('itemChanged( QStandardItem *)'), self.foo) At least that works for me. Best, Mads

[PyQt] creating a QgraphicsView in MainWindow

2009-02-26 Thread Mads Kofod Hansen
() scene.addPixmap(QtGui.QPixmap('icons/Exit.png')) grview.setScene(scene) app = QtGui.QApplication(sys.argv) main = MainWindow() main.show() sys.exit(app.exec_()) But this only displays the MainWindow with a menubar. How do I create the GraphicsView in the MainWindow? thanks for any help Mads

Re: [PyQt] creating a QgraphicsView in MainWindow

2009-02-26 Thread Mads Kofod Hansen
wrote: On Thu, 26 Feb 2009 02:16:41 -0800 (PST), Mads Kofod Hansen kofo...@yahoo.com wrote: I have a QMainWindow with a menu bar and I want to create a QGraphicsView below the menu bar. But this only displays the MainWindow with a menubar. How do I create the GraphicsView in the MainWindow

Re: [PyQt] Re: how to show interactive Picture

2009-02-10 Thread Mads Ipsen
- Original Besked Fra: Markus Feldmann feldmann_mar...@gmx.de Til: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com Emne: [PyQt] Re: how to show interactive Picture Dato: 09/02/09 23:58 Mads Ipsen schrieb: gt; Could is be that you try to paint before the window is shown

[PyQt] (no subject)

2009-02-10 Thread Mads Ipsen
- Original Besked Fra: Markus Feldmann feldmann_mar...@gmx.de Til: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com Emne: [PyQt] Re: how to show interactive Picture Dato: 09/02/09 23:58 Mads Ipsen schrieb: gt; Could is be that you try to paint before the window is shown

Re: [PyQt] how to show interactive Picture

2009-02-09 Thread Mads Ipsen
- Original Besked Fra: Markus Feldmann feldmann_mar...@gmx.de Til: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com Emne: [PyQt] how to show interactive Picture Dato: 09/02/09 23:18 Hi All, i am programming a MDI Application where a Window in the workspace shall work

Re: [PyQt] Getting it ready to ship.

2009-02-06 Thread Mads Ipsen
___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt 1. Distribute only pyc files. 2. Use the VendorID approach Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http

[PyQt] compare EditTriggers

2009-02-06 Thread Mads Ipsen
returned in the triggers variable above? Doing triggers == (QAbstractItemView.DoubleClicked | QAbstractItemView.SelectedClicked) returns False. I must be doing something wrong here. Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http

Re: [PyQt] item delegates

2009-02-05 Thread Mads Ipsen
- Original Besked Fra: Baba-k babak...@gmail.com Til: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com Emne: Re: [PyQt] item delegates Dato: 05/02/09 11:09 Hi Mads, I dunno if this is the best way of doing it but could you test to see which row/column the item

  1   2   >