Giovanni Bajo a écrit :
On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote:
Thanks a lot, your solution works fine. :-) Here is the complete
minimal code :
#!/usr/bin/env python
#coding=utf-8
import sys
from PyQt4 import QtGui, QtCore
app = QtGui.QAppl
I have not tested on Linux, but it would not surprise me if it was not
supported in the same way.
-Aron
On Mon, Apr 27, 2009 at 5:22 PM, Giovanni Bajo wrote:
> On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote:
>> Thanks a lot, your solution works fine. :-) Here is the complete
>> minimal cod
On Monday 27 April 2009 19:22:04 Giovanni Bajo wrote:
> On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote:
> > Thanks a lot, your solution works fine. :-) Here is the complete
> > minimal code :
> >
> >
> > #!/usr/bin/env python
> > #coding=utf-8
> > import s
On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote:
> Thanks a lot, your solution works fine. :-) Here is the complete
> minimal code :
>
>
> #!/usr/bin/env python
> #coding=utf-8
> import sys
> from PyQt4 import QtGui, QtCore
> app = QtGui.QApplication(sys.
Thanks a lot, your solution works fine. :-) Here is the complete
minimal code :
#!/usr/bin/env python
#coding=utf-8
import sys
from PyQt4 import QtGui, QtCore
app = QtGui.QApplication(sys.argv)
clipboard = app.clipboard()
clipboard.setText('The text that mu
We ran into a similar situation where we wanted to ensure that a
QPixmap that is copied into the clipboard stays after the application
exits. Although as far as I know this should happen automatically when
your Qt application exists, we had to do this use the following code
manually before exiting
sys.exit(app.exec_()) doesn't work. If the clipboard is empty when the program exits, I
will do without PyQt so as to have a "universal" clipboard.
Thanks a lot because now I knows how to use clipboard in a "real" program..
Christophe.
Demetrius Cassidy a écrit :
The clipboard will empty whe
The clipboard will empty when your program exits. Afaik this is normal
behavior with Qt and clipboard access.
I know if I use wxWindows the text in the clipboard stays even if I close my
app, however I am not sure if it's possible to do this in Qt.
And use sys.exit(app.exec_()) instead.
proje
I've tried the following code but the application never stops because of
app.exec_(), and when I close the application, the clipboard is "empty".
=
#!/usr/bin/env python
#coding=utf-8
import sys
from PyQt4 import QtGui
app = QtGui.QApplication(sys.argv)
clipboard = app.cl
Have you tried constructing a QApplication first?
On Sat, Apr 25, 2009 at 8:24 PM, projetmbc wrote:
> I've already try that but I have the following message :
> QWidget: Must construct a QApplication before a QPaintDevice
>
> Christophe.
>
>
> Demetrius Cassidy a écrit :
>
>> from PyQt4.QtGui imp
I've already try that but I have the following message :
QWidget: Must construct a QApplication before a QPaintDevice
Christophe.
Demetrius Cassidy a écrit :
from PyQt4.QtGui import QApplication
clipboard = QApplication.clipboard()
clipboard.setText('mytext')
see http://doc.trolltech.com/4.5
from PyQt4.QtGui import QApplication
clipboard = QApplication.clipboard()
clipboard.setText('mytext')
see http://doc.trolltech.com/4.5/qapplication.html
projetmbc wrote:
>
> Hello,
> here is an example for using the clipboard of Tkinter :
>
> from Tkinter import *
> root
Hello,
here is an example for using the clipboard of Tkinter :
from Tkinter import *
root = Tk()
root.clipboard_clear()
root.clipboard_append('A text in the clipboard...')
root.withdraw()
I would like to do the same with PyQt. Is it possible ?
Christophe
13 matches
Mail list logo