PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
--
+-+
| Mads Ipsen |
+--+--+
| Gåsebæksvej 7, 4. tv
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
. Januar 2013, 15:56:29 schrieb Mads Ipsen:
Hi,
4-5 years I needed a widget with the following properties:
* Display text incl. HTML
* Text should be wrapped on several lines
* When the widget is put into a layout, the height of the widget
should be adjusted in such a way that the text
--
+-+
| Mads Ipsen |
+--+--+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby| phone: +45-29716388 |
| Denmark | email: mads.ip...@gmail.com
--
+-+
| Mads Ipsen |
+--+--+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby| phone: +45-29716388 |
| Denmark | email: mads.ip
.
Best regards,
Mads
--
+-+
| Mads Ipsen |
+--+--+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby| phone: +45
() 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
?
Best regards,
Mads
--
+-+
| Mads Ipsen |
+--+--+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby| phone: +45-29716388
.
Best regards,
Mads
--
+-+
| Mads Ipsen |
+--+--+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby| phone: +45-29716388
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
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
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
.
* 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
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
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
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
, 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
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
Hi,
I have reverse engineered the QFileDialog class so it can be used as a
file browser. Now I'd like to be able to access the underlying machinery
in such a way that I can control the displayed drag icons when e.g. a
file with the .py extension is being dragged.
Any clues to where I should
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
Sorry for my extremely sloppy writing. I'll try again:
Hi,
If you set wordWrap to True for a QLabel which has been added to a
widget with a layout, the resizing of the parent widget is kinda
strange: The widget can be resized to nothing etc.
I've attached a small example, displaying two
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
Hi,
I have a GLWidget (OpenGL) based window which is used for displaying
chemical structures. I would like to use this window to generate
thumbnails used as icons for the files containing the chemical structures.
I would like to hide this process of icon generation from the user, so
is
Hi,
I have attached a simple example where a widget sets up two labels. One
which is added to the layout of the widget, and one which is not.
In the paintEvent() of the parent widget I instead position the
non-layout label using setGeometry to make it appear in the center of
the parent
. 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
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
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
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
, 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
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
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone: +45-29716388 |
| Nørre Søgade 27A | www
believe this makes QT_APP a
single object.
Best regards,
Mads
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone
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
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
in-place?Uppercase
Any help/directions are welcome.
Best, Mads
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone
self.setModel(self._model)
if __name__ == __main__:
app = QtGui.QApplication(sys.argv)
widget = View()
widget.show()
sys.exit(app.exec_())
--
+-+
| Mads Ipsen, Scientific developer
dizou wrote:
Solved this.
How?
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone: +45-29716388
())
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone: +45-29716388 |
| Nørre Søgade 27A | www:www.quantumwise.com |
| DK-1370 Copenhagen K, Denmark
to look for. Any clues?
Best regards,
Mads
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone: +45
()
sys.exit(app.exec_())
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone: +45-29716388 |
| Nørre Søgade
.
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone: +45-29716388 |
| Nørre Søgade 27A | www
)
widget.setCursor(cursor)
sys.exit(app.exec_())
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S | phone: +45-29716388
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
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
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
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
)
widget = QtGui.QWidget()
widget.show()
cursor = QtGui.QCursor(QtCore.Qt.SizeAllCursor)
widget.setCursor(cursor)
sys.exit(app.exec_())
--
+-+
| Mads Ipsen, Scientific developer
()
line_edit.setValidator(Validator())
line_edit.show()
sys.exit(app.exec_())
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise A/S
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
/QtCore/qdatetime.sip:55: warning: deprecated conversion from string
constant to ‘char*’
--
+-+
| Mads Ipsen, Scientific developer|
+---+-+
| QuantumWise
|
QtGui.QMessageBox.Escape)
--
++
| Mads Ipsen, Scientific developer |
+--+-+
| QuantumWise A/S | phone: +45-29716388 |
| Nørresøgade
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
.
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
.
Sys info:
Ubuntu 8.04
Qt 4.5.2
PyQt 4.5.4
--
++
| Mads Ipsen, Scientific developer |
+--+-+
| QuantumWise A/S | phone: +45-29716388
--
++
| Mads Ipsen, Scientific developer |
+--+-+
| QuantumWise A/S | phone: +45-29716388 |
| Nørresøgade 27A | www
( 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
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
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
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
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
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 in the PyQt book
by M. Summerfield). The clicked() signal of the QPushButton
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
laurlaur wrote:
Just for a better view
Hi,
I'm new in PyQt programing so please have mercy :)
I want to display the directories content and to catch the event
mouseDoubleClickEvent , but it seems that I have some problems chatching
this event. Eventualy if someone have a better ideea how to do
Hi,
I can't seem to understand this. If I pass an empty stylesheet to a
QLineEdit, the edit field changes property.
* Try to enter a 'g' in the example included below. The lower part of
the 'g' will be invisible.
* Remove the call to setStyleSheet(). The lower part of the 'g' becomes
On a machine with
LANG=en_DK.UTF-8
The script
import numpy
# Now numpy is OK
print %s % (numpy.float64(3.023423))
print %s %r % (numpy.float32(3.023423), numpy.float32(3.023423))
prints
3.023423
3.02342 3.023423
Now change the script to
import sys, os
from PyQt4 import QtCore,
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,
TP wrote:
Hi everybody,
I have detected a strange behavior on Linux with QSpinBox (try the code
example below): when the valueChanged( int ) signal is connected to a
function that takes some time to execute, sometimes the up and down
clickable buttons of the QSpinBox increment and decrement
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):
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):
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
Os Windows Vista Home Ru + sp1
g++ (GCC) 3.4.5 (mingw-vista special r3)
Qt 4.5 (self build)
sip-4.7.9 (self build)
PyQt-win-gpl-4.4.4.zip (self build)
I was unable to allocate a minimum example. Here is pseudocode situations:
[code]
class BaseData(QObject):
def save(self, obj):
Hi all,
I have just started using pyqt4 and decided to make a small
thumbnail-viewer to learn how things work.
I would like the thumbnails to be displayed in a grid that
automatically change the grid when resized so I use the QListWidget.
So far so good - it works fine ...almost... the
Hey all,
Since I still haven't been able to
http://www.nabble.com/Sorting-column-with-QComboBox-cellwidgets-td22499840.html
automatically sort a column with combo boxes , and now have another column
with special sorting conditions, I'd like to manually do the sorting.
The problem is that
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 *
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
How does one connect to the signals of a QItemModel?
I tried the following, but it didn't work:
self.connect(
self.model,
QtCore.SIGNAL('itemChanged(QStandardItem 8)'),
self.on_model_itemChanged
)
and
- 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
- 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
- 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
- Original Besked
Fra: Knapp magick.c...@gmail.com
Til: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com
Emne: [PyQt] Getting it ready to ship.
Dato: 06/02/09 09:51
OK, I now have a little finished project that I want to send out to
buyers so they can take a look. How do
Suppose I say
tree_view = QTreeView()
tree_view.setEditTriggers(QAbstractItemView.DoubleClicked |
QAbstractItemView.SelectedClicked)
Then I can query the flags I just set by calling
triggers = tree_view.editTriggers()
But how do I test that the flags that I just have set actually are the ones
Mads Ipsen-3 wrote:
gt;
gt; Hi,
gt;
gt; Suppose I have a TableView. Then I can set itemdelegates for a
column, a
gt; row
gt; or the entire view using the respective methods
gt;
gt; void setItemDelegateForColumn ( int column, QAbstractItemDelegate *
gt; delegate
gt; )
gt; void
- Original Besked
Fra: Knapp magick.c...@gmail.com
Til: Frédéric frederic.mantega...@gbiloba.org
Cc: pyqt@riverbankcomputing.com
Emne: Re: [PyQt] set qlineedit red, easy?? SOLVED
Dato: 05/02/09 13:11
On Thu, Feb 5, 2009 at 12:50 PM, Frédéric
- Original Besked
Fra: Phil Thompson p...@riverbankcomputing.com
Til: Brent Villalobos brent.villalo...@pdi.dreamworks.com
Cc: pyqt@riverbankcomputing.com
Emne: Re: [PyQt] rcc module?
Dato: 05/02/09 21:43
On Thu, 05 Feb 2009 11:59:20 -0800, Brent Villalobos
Hi,
Suppose I have a TableView. Then I can set itemdelegates for a column, a row
or the entire view using the respective methods
void setItemDelegateForColumn ( int column, QAbstractItemDelegate * delegate
)
void setItemDelegateForRow ( int row, QAbstractItemDelegate * delegate )
void
- Original Besked
Fra: Matt Smith mel...@orangepalantir.org
Til: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com
Emne: Re: [PyQt] QSpinBox and setLineEdit
Dato: 30/01/09 14:11
gt;
gt; Well, OK. My problem is that I would like to connect up to the
gt;
to
returns. I post a small cone snippet in a separate post that illustrates
this.
Mads
- Original Besked
Fra: Matt Smith mel...@orangepalantir.org
Til: Mads Ipsen m...@comxnet.dk
Cc: pyqt@riverbankcomputing.com
Emne: Re: [PyQt] QSpinBox and setLineEdit
Dato: 30/01/09 15:15
On Fri
The following observation occurs on Linux (Ubuntu 8.04) with PyQt-4.4.4 and
qt-4.4.3.
If you connect to the valueChanged signal from a spin box, and the function
you call, take a long time before it returns, the spin box jams and does
several increments of it value. I have included a small
- Original Besked
Fra: Matt Smith mel...@orangepalantir.org
Til: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com
Cc: Mads Ipsen m...@comxnet.dk
Emne: Re: [PyQt] QSpinBox and setLineEdit
Dato: 30/01/09 19:10
gt; Yes, this will do the trick provided that the function you
89 matches
Mail list logo