[PyQt] signals and slots
Hi, is there a way to connect a signal that has no arguments, like the 'activated()' signal, to a slot with one or more arguments ? Regards, Strato ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: creating TIFF with CCITT FAX group 4 compression
Glenn == Glenn Linderman [EMAIL PROTECTED] writes: Glenn Found PIL, but PIL writes only uncompressed TIFF files too, Glenn according to its documentation. Glenn I'm pretty far down the list of Google hits, so thought Glenn maybe it was time to ask if anyone has figured out how to Glenn write out a QImage into a TIFF file along with using CCITT Glenn FAX group 4 compression. maybe you should ask to packages.debian.org before than google :-) http://libtiff.maptools.org/man/tiffcp.1.html Alberto ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Advice for building PyQt4 (Qt 4.4) on Windows XP
Hello, Is it required to compile Python from sources in order to use Qt 4.4 features? As far as I know, Qt 4.4 requires MSVC 2008 for Webkit and some other advanced widgets. IIRC Python extension libraries should be compiled with the same compiler used for building python itself. Is this a must? I would be glad if someone shares his/her experiences. Best regards, Maik ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Re: creating TIFF with CCITT FAX group 4 compression
On approximately 7/16/2008 3:37 AM, came the following characters from the keyboard of Alberto Berti: Glenn == Glenn Linderman [EMAIL PROTECTED] writes: Glenn Found PIL, but PIL writes only uncompressed TIFF files too, Glenn according to its documentation. Glenn I'm pretty far down the list of Google hits, so thought Glenn maybe it was time to ask if anyone has figured out how to Glenn write out a QImage into a TIFF file along with using CCITT Glenn FAX group 4 compression. maybe you should ask to packages.debian.org before than google :-) http://libtiff.maptools.org/man/tiffcp.1.html Thanks for the response. If I were a debian user, perhaps I would have... I actually did see a reference tiffcp in my Googlings, but it didn't seem to directly address the issue of writing a QImage (memory) to a G4-compressed TIFF file. I'm hoping for a cross-platform solution, across Mac, Linux, and Windows. I'd also rather compress the file before writing it out to disk, and then making a compressed copy after writing it... saves wear and tear on the disk. The closest that I've found so far is http://artis.imag.fr/Software/TiffIO/#DWN but it looks rather frightening to attempt to build and install on three different platforms, for a novice Python, novice Qt user. It is also a couple years old, mentioning Qt 4.0.1 rather than current releases. Of course, a pure Python solution is likely to be slow in CPU performance... so maybe I should gain 6 months experience and then look at this again. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] signals and slots
Strato: Use a slot/function in the middle to call your slot with more arguments with whatever arguments you want? activated() SIGNAL - activateSlot()-slotWithArgs(whatever_args) You should be able to emit from activateSlot if you wanted to do it that way as well. This seems to obvious to me so maybe this wasn't what you were wanting. Russell Valentine Strato wrote: Hi, is there a way to connect a signal that has no arguments, like the 'activated()' signal, to a slot with one or more arguments ? Regards, Strato ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] creating TIFF with CCITT FAX group 4 compression
On Wed Jul 16 04:46:02 BST 2008, Glenn Linderman wrote: So I generate a QImage with a BW (bitonal) image, using PyQt. Writing it out produces a full-color 32bpp uncompressed TIFF file. Ick. QImage doesn't seem to know how to produce other variations. So I wrote it into a QByteArray per the docs, and extracted the data(). Apparently, you can write out LZW-compressed TIFFs: http://www.riverbankcomputing.com/static/Docs/PyQt4/html/qimagewriter.html#setCompression Found PIL, but PIL writes only uncompressed TIFF files too, according to its documentation. There appears to be an attempt to patch it to support reading of group 4 compressed files: http://mail.python.org/pipermail/image-sig/2003-July/002354.html And some code to use tiffcp to do the hard work of writing a compressed image: http://groups.google.co.uk/group/comp.lang.python/msg/0af79e0c99609f9d Found pytiff, can't figure out if it can write compressed TIFF files or not, nor how to make it read a TIFF from a string in memory, as it takes a filename, rather than a file() object as a parameter. It looks like it might be able to perform the compression - see the FAQ on this page: http://www.haynold.com/software_projects/2004/pytiff/ Though it's certainly a problem that it uses file names rather than file objects. I suppose it could be modified to support them. I'm pretty far down the list of Google hits, so thought maybe it was time to ask if anyone has figured out how to write out a QImage into a TIFF file along with using CCITT FAX group 4 compression. This message from the python-list looks interesting: http://mail.python.org/pipermail/python-list/2006-September/405457.html Perhaps the FreeImagePy project mentioned will be useful: http://freeimagepy.sourceforge.net/ Let us know if you find something that works. Good luck! David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] sip doesn't recognize structs with parent structs/classes
I've got a simple sip file that has: struct Foo { %TypeHeaderCode #include foo.h %End virtual Foo(); }; struct Bar: Foo { %TypeHeaderCode #include foo.h %End virtual Bar(); }; That should be valid code though, right? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] sip doesn't recognize structs with parent structs/classes
On Wednesday 16 July 2008 16:12, Erick Tryzelaar wrote: I've got a simple sip file that has: struct Foo { %TypeHeaderCode #include foo.h %End virtual Foo(); }; struct Bar: Foo { %TypeHeaderCode #include foo.h %End virtual Bar(); }; That should be valid code though, right? It's valid C++, sip may or may not accept it (sip only covers a meaningful subset of C++), and it's identical to the following code which sip will accept: class Foo { %TypeHeaderCode #include foo.h %End public: virtual Foo(); }; class Bar: Foo { %TypeHeaderCode #include foo.h %End public: virtual Bar(); }; Jim___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QComboBox: Icons: Error
My application has a QComboBox that contains icons on each line. It worked fine with (Py)Qt 4.3. I'm now using Qt 4.4.0 and PyQt 4.4.2. I receive the following error at runtime: Traceback (most recent call last): File ./Q7Z.pyw, line 14, in module import Main File Main.py, line 52, in module uiMain.setupUi(mwMain) File /media/Exchange/Programming/PyQt4/Q7Z/SVN/SourceForge/trunk/Q7Z/Source/Ui_Main.py, line 758, in setupUi self.retranslateUi(Main) File /media/Exchange/Programming/PyQt4/Q7Z/SVN/SourceForge/trunk/Q7Z/Source/Ui_Main.py, line 804, in retranslateUi self.cbAlgorithm.addItem(icon,QtGui.QApplication.translate(Main, 7-Zip, None, QtGui.QApplication.UnicodeUTF8)) NameError: global name 'icon' is not defined Related issues have been raised both on this mailing list and here: http://groups.google.com/group/profitpy-discuss/browse_thread/thread/fb579a71c66fecb2. Will this problem be fixed in time for the PyQt 4.4.3 release? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt