[PyQt] Error when build QScintilla
My Environment: Os Windows Vista Home Basic Ru + sp1 g++ (GCC) 3.4.5 (mingw-vista special r3) Qt 4.5.1 (self build) Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Error log: C:\Lang\qt\qscintilla-2.4mingw32-make cd Qt4 qmake qscintilla.pro mingw32-make[1]: Entering directory `C:/Lang/qt/qscintilla-2.4/Qt4' mingw32-make -f Makefile.Release mingw32-make[2]: Entering directory `C:/Lang/qt/qscintilla-2.4/Qt4' g++ -c -O3 -march=pentium3 -mtune=pentium3 -w -frtti -fexceptions -mthreads -DQS CINTILLA_MAKE_DLL -DQT -DSCI_LEXER -DQT_THREAD_SUPPORT -DQT_DLL -DQT_NO_DEBUG -D QT_GUI_LIB -DQT_CORE_LIB -I'../../qt4.5.1/include/QtCore' -I'../../qt4.5.1/inclu de/QtGui' -I'../../qt4.5.1/include' -I'.' -I'../include' -I'../src' -I'../../qt4 .5.1/include/ActiveQt' -I'release' -I'.' -I'../../qt4/mkspecs/win32-g++' -o rele ase/qscilexercustom.o qscilexercustom.cpp In file included from qscilexercustom.cpp:36: Qsci/qscilexercustom.h:107: error: `QsciScintilla' has not been declared Qsci/qscilexercustom.h:107: error: ISO C++ forbids declaration of `editor' with no type qscilexercustom.cpp: In member function `void QsciLexerCustom::startStyling(int, int)': qscilexercustom.cpp:59: error: `editor' was not declared in this scope qscilexercustom.cpp:65: error: `editor' was not declared in this scope qscilexercustom.cpp: In member function `void QsciLexerCustom::setStyling(int, i nt)': qscilexercustom.cpp:73: error: `editor' was not declared in this scope qscilexercustom.cpp:76: error: `editor' was not declared in this scope qscilexercustom.cpp: At global scope: qscilexercustom.cpp:89: error: prototype for `void QsciLexerCustom::setEditor(Qs ciScintilla*)' does not match any in class `QsciLexerCustom' Qsci/qscilexercustom.h:107: error: candidate is: virtual void QsciLexerCustom::s etEditor(int*) qscilexercustom.cpp: In member function `void QsciLexerCustom::setEditor(QsciSci ntilla*)': qscilexercustom.cpp:90: error: `editor' was not declared in this scope qscilexercustom.cpp:94: error: `setEditor' is not a member of `QsciLexer' qscilexercustom.cpp:96: error: `editor' was not declared in this scope qscilexercustom.cpp: In member function `void QsciLexerCustom::handleStyleNeeded (int)': qscilexercustom.cpp:112: error: `editor' was not declared in this scope mingw32-make[2]: *** [release/qscilexercustom.o] Error 1 mingw32-make[2]: Leaving directory `C:/Lang/qt/qscintilla-2.4/Qt4' mingw32-make[1]: *** [release] Error 2 mingw32-make[1]: Leaving directory `C:/Lang/qt/qscintilla-2.4/Qt4' mingw32-make: *** [Qt4] Error 2 I write simple makefile for build and install QScintilla all: Qt4 Python designer-Qt4 example-Qt4 Qt4: cd Qt4 qmake qscintilla.pro @$(MAKE) -j3 -C Qt4 Python: cd Python python configure.py @$(MAKE) -j3 -C Python designer-Qt4: cd designer-Qt4 qmake designer.pro @$(MAKE) -j3 -C designer-Qt4 example-Qt4: cd example-Qt4 qmake application.pro @$(MAKE) -j3 -C example-Qt4 Qt4-install: Qt4 @$(MAKE) -j3 -C Qt4 install Python-install: Python @$(MAKE) -j3 -C Python install designer-Qt4-install: designer-Qt4 @$(MAKE) -j3 -C designer-Qt4 install install: Qt4-install Python-install designer-Qt4-install .PHONY: \ all Qt4 Python designer-Qt4 example-Qt4 \ install Qt4-install Python-install designer-Qt4-install___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QImage displays arbitrary data
Hello all, I am using the python wrapper for opencv, and want to display an opencv image (Swig wrapped CvMat) in a PyQt Widget. To achieve this I create a QImage and wrap it in a Widget-Subclass. The shown Image has correct size but the data shown is corrupted. I create the QImage, with the constructors: QImage.__init__ (self, str data, int width, int height, Format format) or QImage.__init__ (self, str data, int width, int height, int bytesPerLine, Format format) CvMat has a string property imageData, which contains the data. From the OpenCv Docs: the usual data layout of a color image is: b0 g0 r0 b1 g1 r1 ... I know blue and red are switched, but nevertheless it should display the image correctly except for the colors. I have attached a minimal example debug.py. A screenshot of the two Windows (left opencv-highgui, right qt) is also attached. Any help is appreciated, Felixattachment: screenshot.pngfrom PyQt4 import QtGui from PyQt4 import QtCore from opencv.cv import * from opencv.highgui import * import sys class ImageViewWidget(QtGui.QWidget): def __init__(self, qimage): QtGui.QWidget.__init__(self) self.image = qimage def paintEvent(self, event): painter = QtGui.QPainter(self) painter.drawImage(0,0,self.image) if __name__ == __main__: app = QtGui.QApplication(sys.argv) img = cvCreateImage(cvSize(320, 200), IPL_DEPTH_8U, 3) cvSet(img, (128,0,0)) cvLine(img, cvPoint(5,5), cvPoint(315,195), (0,0,255), 5) cvLine(img, cvPoint(315,5), cvPoint(5,195), (0,255,0), 3) cvNamedWindow(a) cvShowImage(a, img) qimg = QtGui.QImage(img.imageData, img.width, img.height, img.step, QtGui.QImage.Format_RGB888) ivw = ImageViewWidget(qimg) ivw.show() app.exec_() ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] some bugs in opengl examples
On Wed, 27 May 2009 10:47:23 +0900, Francis Cho geburs...@gmail.com wrote: Hello, I found some bugs in opengl examples. 1. Wrong conversion of the original C++ code. It is in grabber.py. I changed as following to get the correct behavior. FROM def resizeGL(self, height, width): TO def resizeGL(self, width, height): Before changing the code like the above, the opengl widget portion of the window couldn't be shrinked or enlarged correctly. From the original C++ code, we can see that the modified is correct. 2. OpenGL related error message from grabber.py, hellogl.py and textures.py on mac osx. I got the following OpenGL related error message from the above three files on mac osx only. Traceback (most recent call last): File grabber.py, line 131, in resizeGL glViewport((width - side) / 2, (height - side) / 2, side, side) File /Library/Python/2.5/site-packages/OpenGL/error.py, line 194, in glCheckError baseOperation = baseOperation, OpenGL.error.GLError: GLError( err = 1281, description = 'invalid value', baseOperation = glViewport, cArguments = (0, 0, -1, -1) ) I inserted a line to see the value of width and height in resizeGL and I could notice that the resizeGL was called twice. francis-macbook-pro:opengl ycc$ python grabber.py 2/dev/null -1 0 179 164 As you can see from above, the first line contains strange values. So, I entered the following two lines right after def resizeGL... as a workarround. if height 0 or width 0: return This was not happened with some old snapshots. I forgot the specific name of the snapshots. Thanks, Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Testing mailing list.. wan, due, un, 2, tri, floor
Intro.. Its pedro, and developing code in pyqt. also #p_masho on freenode. test 123 regards Pete Mash Morgan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] How to slim programs under windows
Hi, I build a exe program with py2exe, and it size is about 8M. The program is very simple, it's a widget that contain too lineedit and a button, it's based on pyqt. Please is there a way to resize the file for small one. Regards, -- Ali MEZGANI Network Engineering/Security http://securfox.wordpress.com/ ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Next Releases
Hi, I found the method I was looking for. It is QSslSocket.supportsSsl(). (It is a static method) Detlev On Dienstag, 26. Mai 2009, Phil Thompson wrote: On Tue, 26 May 2009 19:02:21 +0200, Detlev Offenbach det...@die-offenbachs.de wrote: On Dienstag, 26. Mai 2009, Phil Thompson wrote: On Tue, 26 May 2009 18:39:20 +0200, Detlev Offenbach det...@die-offenbachs.de wrote: On Dienstag, 26. Mai 2009, Phil Thompson wrote: I plan to release new versions of SIP, PyQt3, PyQt4 and QScintilla at the end of the week based on the current snapshots. If there is something you think is missing or broken then now would be a good time to remind me. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt Is there a way to test, if Qt and/or PyQt were built with SSL support. Overe here I get strange errors on a Win system. My QSsl... imports work fine (i.e. no ImportError is raised). However, executing this code from PyQt4.QtNetwork import QSslConfiguration. sslCfg = QSslConfiguration.defaultConfiguration() caList = sslCfg.caCertificates() print len(caList) prints '0' to the console, while it prints '81' on my Linux box. This makes me assume, that Qt on win is not compiled with SSL support by default (I used the standard win installer for Qt 4.5.1 from Nokia). If there is no programmatic way to do this, would it be possible to add a method to QSslConfiguration (e.g. isAvailable()) that tells, if SSL support is available. I think this could be done with some handwritten code using something like this. QSslConfiguration::isAvailable() { #ifndef QT_NO_OPENSSL return true; #else return false; #endif The imports would fail if there was no SSL support. It just looks like the certificate database is empty. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt I thought so as well. However, trying to connect to a site via https results in a bunch of error messages from Qt printed in the console. QSslSocket: cannot call unresolved function SSLv3_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function ERR_error_string QSslSocket: cannot call unresolved function SSLv3_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function ERR_error_string QSslSocket: cannot call unresolved function SSLv3_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function ERR_error_string QSslSocket: cannot call unresolved function SSLv3_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function ERR_error_string and the result is an error page being displayed in QWebView telling me, that the URL could not be loaded (Reason: HTTP request failed). All this made me believe, that SSL support is not there. That would imply that a DLL was missing, or not on the PATH. I don't know how the Qt installer is built. My builds use static libraries. Phil -- Detlev Offenbach det...@die-offenbachs.de ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QWidget.winEvent and PyQt4.QtCore.MSG
Hi there, i have overwritten a QWidget's winEvent() function because i want to receive a message from another application, which sends it to my application using SendMessage (win32, winapi black magic). winEvent() gets called as expect with one argument, PyQt4.QtCore.MSG. The problem that i am having is that i do not know how to get the type of the received message and its data. Any advice on how to do that or another way how i can listen for windows messages? regards, lg ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QTreeView Windows cell resizing issue
I have a QTreeView with custom widgets in it and I use the 'resizeColumnsToContents' and 'resizeRowsToContents' functions to correctly size all the cells. This works correctly on Linux but not on Windows.. I am using v4.5-snapshot-20090409 which is a bit old now but I cannot see anything in the change logs related to this anyway. Also, is there anyway to disable user-resizing of the columns and rows? Cheers ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt