Re: [PyQt] Resizing widgets in a window.

2009-01-30 Thread Geert Vancompernolle
Sandro Dutra wrote: Hi. I create a mainWindow and put some widgets in there, textEdit for example, but if I maximize the mainWindow, the textEdit don't strech with the mainWindow. I try to set the size policy of the textEdit to Expanding | Expanding and tested some other things related to siz

[PyQt] Resizing widgets in a window.

2009-01-30 Thread Sandro Dutra
Hi. I create a mainWindow and put some widgets in there, textEdit for example, but if I maximize the mainWindow, the textEdit don't strech with the mainWindow. I try to set the size policy of the textEdit to Expanding | Expanding and tested some other things related to size of the child widget wit

Re: [PyQt] Dialogue box with hyperlink

2009-01-30 Thread Geert Vancompernolle
Sundance wrote: http://spyrit.svn.sourceforge.net/viewvc/spyrit/trunk/AboutDialog.py?revision=187&view=markup Basically, you use a QLabel that contains your link in HTML, and don't forget to setOpenExternalLinks( True ) on that label. Links are then opened when clicked with the user's default

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mads Ipsen
- Original Besked Fra: Matt Smith Til: pyqt@riverbankcomputing.com Cc: Mads Ipsen Emne: Re: [PyQt] QSpinBox and setLineEdit Dato: 30/01/09 19:10 > > Yes, this will do the trick provided that the function you connect to does > > not take to long to update. In that case the spin

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
> Yes, this will do the trick provided that the function you connect to does > not take to long to update. In that case the spin box jams or locks and does > several increments of its value. This is exactly why I want to connect to > the lineedit since this is first updated once the function you co

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
On Fri, 2009-01-30 at 16:00 +0100, Mads Ipsen wrote: > Yes, this will do the trick provided that the function you connect to does > not take to long to update. In that case the spin box jams or locks and does > several increments of its value. This is exactly why I want to connect to > the lineedit

[PyQt] SpinBox jam/lock

2009-01-30 Thread Mads Ipsen
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 snippet

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mads Ipsen
Yes, this will do the trick provided that the function you connect to does not take to long to update. In that case the spin box jams or locks and does several increments of its value. This is exactly why I want to connect to the lineedit since this is first updated once the function you connect to

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
On Fri, 2009-01-30 at 14:55 +0100, Mads Ipsen wrote: > import sys > > from PyQt4 import QtCore, QtGui > > def foo(text): > print 'valueChanged():', text > > if __name__ == "__main__": > app = QtGui.QApplication(sys.argv) > spin_box = QtGui.QSpinBox() > line_edit = spin_bo

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mads Ipsen
- Original Besked Fra: Matt Smith Til: pyqt@riverbankcomputing.com Emne: Re: [PyQt] QSpinBox and setLineEdit Dato: 30/01/09 14:11 > > > > > Well, OK. My problem is that I would like to connect up to the > > textChanged(const QString &) signal emitted by the spinbox's linee

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
> > Well, OK. My problem is that I would like to connect up to the > textChanged(const QString &) signal emitted by the spinbox's lineedit. > This > signal, however, is only emitted when the edit is modified directly, not > when it changes indirectly eg. by pressing the up/down arrows on the > sp

Fw: Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mpi
- Original Besked Fra: Mpi Til: Phil Thompson Emne: Re: [PyQt] QSpinBox and setLineEdit Dato: 30/01/09 10:49 > > - Original Besked > Fra: Phil Thompson > Til: Mpi > Cc: pyqt@riverbankcomputing.com > Emne: Re: [PyQ

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Phil Thompson
On Fri, 30 Jan 2009 10:22:57 +0100, Mpi wrote: > Hi, > > You can set a custom line edit on a spinbox using the method setLineEdit(). > Suppose I implement a class that inherits from QLineEdit and overwirite the > 'setText' method, you'd expect that pressing the arrow button on the > spinbox > wou

[PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mpi
Hi, You can set a custom line edit on a spinbox using the method setLineEdit(). Suppose I implement a class that inherits from QLineEdit and overwirite the 'setText' method, you'd expect that pressing the arrow button on the spinbox would trigger a call to your custom setText method. I can't get t