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 =
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
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.argv)
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 sys
from
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 ra...@develer.com wrote:
On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote:
Thanks a lot, your solution works fine. :-) Here is the complete
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 when
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
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 ?
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 =
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
Have you tried constructing a QApplication first?
On Sat, Apr 25, 2009 at 8:24 PM, projetmbc projet...@club-internet.frwrote:
I've already try that but I have the following message :
QWidget: Must construct a QApplication before a QPaintDevice
Christophe.
Demetrius Cassidy a écrit :
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 =
12 matches
Mail list logo