From oislone at ois.idv.tw Thu Jun 5 18:38:06 2014 From: oislone at ois.idv.tw (OisLone) Date: Fri, 06 Jun 2014 00:38:06 +0800 Subject: [PySide] sender connect to multi slot Message-ID: <53909CEE.9060503@ois.idv.tw> Hello ALL: Now I can use methods like def FuncA (): print ("AAA") def FuncB (): print ("BBB") q = QPushButton ("TEST") q.clicked.connect (FuncA) q.clicked.connect (FuncB) I can use another way? Like Python List For example: def FuncA (): print ("AAA") def FuncB (): print ("BBB") q = QPushButton ("TEST") lis = [FuncA, FuncB] q.clicked.connect (lis) Because only need to define a variable lis, I can set up multiple QPushButton's connect, if the need to change, can modify the lis only. From oislone at ois.idv.tw Thu Jun 5 18:50:58 2014 From: oislone at ois.idv.tw (OisLone) Date: Fri, 06 Jun 2014 00:50:58 +0800 Subject: [PySide] sender connect to multi slot anoth way ? Message-ID: <53909FF2.8000204@ois.idv.tw> sorry, again~ or can use the way ? def funcA(): print("AAA" ) def funcB(): print("BBB" ) def funcC(): print("CCC" ) q1 = QPushButton( "Q1" ) q2 = QPushButton( "Q2" ) q1.clicked.connect( funcA, funcB ) q2.clicked.connect( funcA, funcC ) thank. From carlos.zun at gmail.com Fri Jun 6 02:14:20 2014 From: carlos.zun at gmail.com (Carlos Zuniga) Date: Thu, 5 Jun 2014 19:14:20 -0500 Subject: [PySide] sender connect to multi slot In-Reply-To: <53909CEE.9060503@ois.idv.tw> References: <53909CEE.9060503@ois.idv.tw> Message-ID: On Thu, Jun 5, 2014 at 11:38 AM, OisLone wrote: > Hello ALL: > > Now I can use methods like > > def FuncA (): > print ("AAA") > > def FuncB (): > print ("BBB") > > q = QPushButton ("TEST") > q.clicked.connect (FuncA) > q.clicked.connect (FuncB) > > I can use another way? Like Python List > For example: > > def FuncA (): > print ("AAA") > > def FuncB (): > print ("BBB") > > q = QPushButton ("TEST") > lis = [FuncA, FuncB] > q.clicked.connect (lis) > > Because only need to define a variable lis, I can set up multiple QPushButton's connect, if the need to change, can modify the lis only. > You could create a closure that calls all those functions: def multifunc(*args): def _multifunc(): for fn in args: fn() return _multifunc And use it like this: funcs = multifunc(FuncA, FuncB) q.clicked.connect (funcs) Code is untested but it should get you going. From oislone at ois.idv.tw Fri Jun 6 12:56:03 2014 From: oislone at ois.idv.tw (OisLone) Date: Fri, 06 Jun 2014 18:56:03 +0800 Subject: [PySide] PySide Digest, Vol 29, Issue 1 In-Reply-To: References: Message-ID: <53919E43.6050000@ois.idv.tw> 於 06/06/2014 06:00 PM, pyside-request at qt-project.org 提到: > > You could create a closure that calls all those functions: > > def multifunc(*args): > def _multifunc(): > for fn in args: > fn() > return _multifunc > > And use it like this: > > funcs = multifunc(FuncA, FuncB) > q.clicked.connect (funcs) > > > Code is untested but it should get you going. > > > ------------------------------ > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > > End of PySide Digest, Vol 29, Issue 1 > ************************************* > > Thanks so much, it really helped me a lot. From jjp at pobox.com Mon Jun 9 13:45:32 2014 From: jjp at pobox.com (Josh Pieper) Date: Mon, 9 Jun 2014 07:45:32 -0400 Subject: [PySide] QTimer reference leaks in pyside vs pyqt Message-ID: <20140609114532.GA25702@rcn.com> Hello, I have an application that wants to repeatedly schedule callbacks into the QT event loop. With pyside, memory usage grows over time, as python doesn't appear to be able to free things up. objgraph shows a growing number of QTimer objects not being collected. With pyqt, this is not a problem, and neither is it with a C++ transliteration. I'm using pyside 1.2.1 on ubuntu 14.04. My demonstration application is below. It is intended to busy loop, but with pyside, in addition, eventually uses all memory on the machine. If you replace PySide with PyQt4, it busy loops just fine, and memory usage does not increase at all over time. I would have tried updating to 1.2.2, but it didn't look like any resource issues were mentioned in the release notes. Am I doing something wrong? Regards, Josh ---- import sys import PySide.QtCore as QtCore def test(): QtCore.QTimer.singleShot(0, test) def main(): app = QtCore.QCoreApplication(sys.argv) test() app.exec_() if __name__ == '__main__': main() From schampailler at skynet.be Mon Jun 9 20:09:32 2014 From: schampailler at skynet.be (Stefan Champailler) Date: Mon, 9 Jun 2014 20:09:32 +0200 Subject: [PySide] QTimer reference leaks in pyside vs pyqt In-Reply-To: <20140609114532.GA25702@rcn.com> References: <20140609114532.GA25702@rcn.com> Message-ID: <20140609200932.3224cc2e@debian> On Mon, 9 Jun 2014 07:45:32 -0400 Josh Pieper wrote: Is it me or this can produce that kind of stack : test() timer triggers and goes to test instantly test() timer triggers and goes to test instantly test() timer triggers and goes to test instantly ... Although it may work I'd say it's somehow risky But that's just my humble opinion, I've never written such code, I use QTimer instances with intervals > 100ms... stF > Hello, I have an application that wants to repeatedly schedule > callbacks into the QT event loop. With pyside, memory usage grows > over time, as python doesn't appear to be able to free things up. > objgraph shows a growing number of QTimer objects not being collected. > With pyqt, this is not a problem, and neither is it with a C++ > transliteration. > > I'm using pyside 1.2.1 on ubuntu 14.04. My demonstration application > is below. It is intended to busy loop, but with pyside, in addition, > eventually uses all memory on the machine. If you replace PySide with > PyQt4, it busy loops just fine, and memory usage does not increase at > all over time. I would have tried updating to 1.2.2, but it didn't > look like any resource issues were mentioned in the release notes. > > Am I doing something wrong? > > Regards, > Josh > > ---- > > import sys > > import PySide.QtCore as QtCore > > def test(): > QtCore.QTimer.singleShot(0, test) > > def main(): > app = QtCore.QCoreApplication(sys.argv) > test() > app.exec_() > > if __name__ == '__main__': > main() > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- Timeo Danaos et dona ferentes Twitter : @Arakowa1 From info.silvio at gmail.com Tue Jun 10 14:35:23 2014 From: info.silvio at gmail.com (Silvio) Date: Tue, 10 Jun 2014 14:35:23 +0200 Subject: [PySide] Error during building for beaglebone targhet Message-ID: <5396FB8B.3080508@gmail.com> My targhet is BeagleBone Black, WITHOUT X11...hence I need Qt video server. targhet so = debian wheezy host = debian wheezy Qt works well without X11, I test it with C/C++ application, I run it in targhet with "-qws" option. now I need use Pyside without X11. I tried to compile, but I receive error. I show my mod in "setup.py", my "toolchain.cmake" file, and my output. I mod Setup.py in Pyside in first line ######### I add variable for toolchain ############ cmake_cmd = [ OPTION_CMAKE, "-DCMAKE_TOOLCHAIN_FILE=/home/silvio/BBB/toolchain.cmake", "-G", self.make_generator, "-DQT_QMAKE_EXECUTABLE=%s" % self.qmake_path, "-DBUILD_TESTS=%s" % self.build_tests, "-DDISABLE_DOCSTRINGS=True", "-DCMAKE_BUILD_TYPE=%s" % self.build_type, "-DCMAKE_INSTALL_PREFIX=%s" % self.install_dir, module_src_dir ] ####because during built i receive error that ld cannot find -lpython2.7 ####hence i force to use target’s “libpython2.7 “ ########## I set this variable to force ########### self.py_library = "/media/rootfs/usr/lib/libpython2.7.so" if sys.version_info[0] > 2: cmake_cmd.append("-DPYTHON3_EXECUTABLE=%s" % self.py_executable) cmake_cmd.append("-DPYTHON3_INCLUDE_DIR=%s" % self.py_include_dir) cmake_cmd.append("-DPYTHON3_LIBRARY=%s" % self.py_library) if self.build_type.lower() == 'debug': cmake_cmd.append("-DPYTHON3_DBG_EXECUTABLE=%s" % self.py_executable) cmake_cmd.append("-DPYTHON3_DEBUG_LIBRARY=%s" % self.py_library) else: .............bla bla bla.... THIS IS MY TOOLCHIAIN.CMAKE: # INCLUDE(CMakeForceCompiler) # CMake toolchain file for building ARM software on OI environment # this one is important SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_PROCESSOR arm) #this one not so much SET(CMAKE_SYSTEM_VERSION 1) # specify the cross compiler SET(CMAKE_C_COMPILER /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin/arm-linux-gnueabihf-gcc) SET(CMAKE_CXX_COMPILER /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin/arm-linux-gnueabihf-g++) SET(CMAKE_CXX_FLAGS "-O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard") SET(CMAKE_STRIP /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin/arm-linux-gnueabihf-strip) # where is the target environment SET(CMAKE_FIND_ROOT_PATH / /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/arm-linux-gnueabihf /media/rootfs /media/rootfs/usr) # search for programs in the build host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # for libraries and headers in the target directories SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) THIS IS MY OUTPUT: python2.7 setup.py bdist_wheel --qmake=/opt/qt-arm/bin/qmake --standalone Removing /home/silvio/BBB/download/PySide-1.2.2/pyside_package running bdist_wheel running build Python architecture is 32bit Inserting path "/opt/qt-arm/bin" to environment Inserting path "/home/silvio/BBB/download/PySide-1.2.2/pyside_install/py2.7-qt4.8.6-32bit-release/bin" to environment ============================== Package version: 1.2.2 Build type: Release Build tests: False --- Make path: /usr/bin/make Make generator: Unix Makefiles Make jobs: --- Script directory: /home/silvio/BBB/download/PySide-1.2.2 Sources directory: /home/silvio/BBB/download/PySide-1.2.2/sources Build directory: /home/silvio/BBB/download/PySide-1.2.2/pyside_build/py2.7-qt4.8.6-32bit-release Install directory: /home/silvio/BBB/download/PySide-1.2.2/pyside_install/py2.7-qt4.8.6-32bit-release Python site-packages install directory: /home/silvio/BBB/download/PySide-1.2.2/pyside_install/py2.7-qt4.8.6-32bit-release/lib/python2.7/site-packages --- Python executable: /usr/bin/python2.7 Python includes: /usr/include/python2.7 Python library: /usr/lib/libpython2.7.so Python prefix: /usr Python scripts: /usr/bin --- Qt qmake: /opt/qt-arm/bin/qmake Qt version: 4.8.6 Qt bins: /opt/qt-arm/bin Qt plugins: /opt/qt-arm/plugins --- OpenSSL libs: None ============================== Building module shiboken... Deleting module build folder /home/silvio/BBB/download/PySide-1.2.2/pyside_build/py2.7-qt4.8.6-32bit-release/shiboken... Creating module build folder /home/silvio/BBB/download/PySide-1.2.2/pyside_build/py2.7-qt4.8.6-32bit-release/shiboken... Configuring module shiboken (/home/silvio/BBB/download/PySide-1.2.2/sources/shiboken)... Running process: /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/home/silvio/BBB/toolchain.cmake -G "Unix Makefiles" -DQT_QMAKE_EXECUTABLE=/opt/qt-arm/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/silvio/BBB/download/PySide-1.2.2/pyside_install/py2.7-qt4.8.6-32bit-release /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/media/rootfs/usr/lib/libpython2.7.so -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/home/silvio/BBB/toolchain.cmake -G Unix Makefiles -DQT_QMAKE_EXECUTABLE=/opt/qt-arm/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/silvio/BBB/download/PySide-1.2.2/pyside_install/py2.7-qt4.8.6-32bit-release /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/media/rootfs/usr/lib/libpython2.7.so -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -- The C compiler identification is GNU 4.9.1 -- The CXX compiler identification is GNU 4.9.1 -- Check for working C compiler: /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin/arm-linux-gnueabihf-gcc -- Check for working C compiler: /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin/arm-linux-gnueabihf-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin/arm-linux-gnueabihf-g++ -- Check for working CXX compiler: /home/silvio/BBB/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin/arm-linux-gnueabihf-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - not found. -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found. -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - found -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found. -- Found Qt4: /opt/qt-arm/bin/qmake (found suitable version "4.8.6", required is "4.5.0") -- Found PythonLibs: /media/rootfs/usr/lib/libpython2.7.so (found suitable version "2.7.3", required is "2.6") -- Found LibXml2: /media/rootfs/usr/lib/arm-linux-gnueabihf/libxml2.so (found suitable version "2.8.0", required is "2.6.32") -- Found LibXslt: /media/rootfs/usr/lib/arm-linux-gnueabihf/libxslt.so (found suitable version "1.1.26", required is "1.1.19") -- sphinx-build - not found! doc target disabled -- Configuring done -- Generating done -- Build files have been written to: /home/silvio/BBB/download/PySide-1.2.2/pyside_build/py2.7-qt4.8.6-32bit-release/shiboken Compiling module shiboken... Running process: /usr/bin/make /usr/bin/make [ 1%] Generating qrc_generator.cxx Scanning dependencies of target apiextractor [ 3%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o [ 5%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/abstractmetabuilder.cpp.o [ 7%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/abstractmetalang.cpp.o [ 9%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/asttoxml.cpp.o [ 11%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/fileout.cpp.o [ 12%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/graph.cpp.o [ 14%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/reporthandler.cpp.o [ 16%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/typeparser.cpp.o [ 18%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/typesystem.cpp.o [ 20%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/include.cpp.o [ 22%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/typedatabase.cpp.o [ 24%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/ast.cpp.o [ 25%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/binder.cpp.o [ 27%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/class_compiler.cpp.o [ 29%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/codemodel.cpp.o [ 31%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/codemodel_finder.cpp.o [ 33%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/compiler_utils.cpp.o [ 35%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/control.cpp.o [ 37%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/declarator_compiler.cpp.o /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/declarator_compiler.cpp:109:2: warning: #warning "ptr to mem -- not implemented" [-Wcpp] #warning "ptr to mem -- not implemented" ^ [ 38%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/default_visitor.cpp.o [ 40%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/dumptree.cpp.o [ 42%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/lexer.cpp.o /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/lexer.cpp: In member function ‘void LocationManager::positionAt(std::size_t, int*, int*, QString*) const’: /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/lexer.cpp:87:9: warning: ‘ppline’ may be used uninitialized in this function [-Wmaybe-uninitialized] int ppline, ppcolumn; ^ /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/lexer.cpp:97:31: warning: ‘line2’ may be used uninitialized in this function [-Wmaybe-uninitialized] *line = base_line + *line - line2 - 1; ^ #warning "implement me" ^ /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/parser.cpp:2140:2: warning: #warning "implemente me (AST)" [-Wcpp] #warning "implemente me (AST)" ^ /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/parser.cpp:2297:2: warning: #warning "implement me" [-Wcpp] #warning "implement me" ^ /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/parser.cpp:2305:2: warning: #warning "implement me" [-Wcpp] #warning "implement me" ^ /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/parser.cpp:2900:2: warning: #warning "mark the ast as constant" [-Wcpp] #warning "mark the ast as constant" ^ /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/parser.cpp:2990:2: warning: #warning "Parser::skipFunctionBody() -- implement me" [-Wcpp] #warning "Parser::skipFunctionBody() -- implement me" ^ /home/silvio/BBB/download/PySide-1.2.2/sources/shiboken/ApiExtractor/parser/parser.cpp:3019:2: warning: #warning "implement me" [-Wcpp] #warning "implement me" ^ [ 50%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/smallobject.cpp.o [ 51%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/tokens.cpp.o [ 53%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/type_compiler.cpp.o [ 55%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/visitor.cpp.o [ 57%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/rpp/builtin-macros.cpp.o [ 59%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/parser/rpp/preprocessor.cpp.o [ 61%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/qrc_generator.cxx.o Linking CXX static library libapiextractor.a [ 61%] Built target apiextractor Scanning dependencies of target libshiboken [ 62%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/basewrapper.cpp.o [ 64%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/debugfreehook.cpp.o [ 66%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/gilstate.cpp.o [ 68%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/helper.cpp.o [ 70%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/sbkconverter.cpp.o [ 72%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/sbkenum.cpp.o [ 74%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/sbkmodule.cpp.o [ 75%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/sbkstring.cpp.o [ 77%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/bindingmanager.cpp.o [ 79%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/threadstatesaver.cpp.o [ 81%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/typeresolver.cpp.o [ 83%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/shibokenbuffer.cpp.o Linking CXX shared library libshiboken-python2.7.so [ 83%] Built target libshiboken Scanning dependencies of target shiboken [ 85%] Building CXX object generator/CMakeFiles/shiboken.dir/generator.cpp.o [ 87%] Building CXX object generator/CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o [ 88%] Building CXX object generator/CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o [ 90%] Building CXX object generator/CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o [ 92%] Building CXX object generator/CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o [ 94%] Building CXX object generator/CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o [ 96%] Building CXX object generator/CMakeFiles/shiboken.dir/main.cpp.o Linking CXX executable shiboken [ 96%] Built target shiboken [ 98%] Running generator for 'shiboken'... /home/silvio/BBB/download/PySide-1.2.2/pyside_build/py2.7-qt4.8.6-32bit-release/shiboken/generator/shiboken: 1: /home/silvio/BBB/download/PySide-1.2.2/pyside_build/py2.7-qt4.8.6-32bit-release/shiboken/generator/shiboken: Syntax error: word unexpected (expecting ")") make[2]: *** [shibokenmodule/shiboken/shiboken_module_wrapper.cpp] Error 2 make[1]: *** [shibokenmodule/CMakeFiles/shibokenmodule.dir/all] Error 2 make: *** [all] Error 2 error: Error compiling shiboken root at deb32-dev-bbb:/home/silvio/BBB/download/PySide-1.2.2# From mpachock at gmail.com Thu Jun 12 15:16:53 2014 From: mpachock at gmail.com (=?ISO-8859-2?Q?Micha=B3_Pachocki?=) Date: Thu, 12 Jun 2014 15:16:53 +0200 Subject: [PySide] Passing slot handler in QAction constructor. Message-ID: Hi, this is construction from PySide examples: self.minimizeAction = QtGui.QAction("Mi&nimize", self, triggered=self.hide) but documentation of QAction describe only these signatures: *class *PySide.QtGui.QAction(*parent*) *class *PySide.QtGui.QAction(*icon*, *text*, *parent*) *class *PySide.QtGui.QAction (*text*, *parent*) Is documentation incomplete? regards, Michal -------------- next part -------------- An HTML attachment was scrubbed... URL: From philip.starkey at monash.edu Fri Jun 13 07:44:22 2014 From: philip.starkey at monash.edu (Philip Starkey) Date: Fri, 13 Jun 2014 05:44:22 +0000 (UTC) Subject: [PySide] QTimer reference leaks in pyside vs pyqt References: <20140609114532.GA25702@rcn.com> Message-ID: Josh Pieper pobox.com> writes: > > Hello, I have an application that wants to repeatedly schedule > callbacks into the QT event loop. With pyside, memory usage grows > over time, as python doesn't appear to be able to free things up. > objgraph shows a growing number of QTimer objects not being collected. > With pyqt, this is not a problem, and neither is it with a C++ > transliteration. > > I'm using pyside 1.2.1 on ubuntu 14.04. My demonstration application > is below. > > Am I doing something wrong? > > Regards, > Josh > > ---- > > import sys > > import PySide.QtCore as QtCore > > def test(): > QtCore.QTimer.singleShot(0, test) > > def main(): > app = QtCore.QCoreApplication(sys.argv) > test() > app.exec_() > > if __name__ == '__main__': > main() > I just tested your example on Windows 8.0, Python 32-bit with PySide 1.2.2 and see no memory leak. Might be worth updating to 1.2.2 just in case, otherwise it looks to be a platform specific issue. I don't believe you are doing anything wrong though. The QTimer should post an event to the Qt Event loop, and the Python function should then end and be garbage collected (along with everything in it that Python owns). The QT Event loop will then run the test function again. The singleShot() method of QTimer doesn't return a reference to the QTimer created anyway, so Python shouldn't really be holding onto any QTimer references I would have thought. Cheers, From jjp at pobox.com Sat Jun 14 03:41:29 2014 From: jjp at pobox.com (Josh Pieper) Date: Fri, 13 Jun 2014 21:41:29 -0400 Subject: [PySide] QTimer reference leaks in pyside vs pyqt In-Reply-To: References: <20140609114532.GA25702@rcn.com> Message-ID: <20140614014129.GF4129@rcn.com> Philip Starkey wrote: > Josh Pieper pobox.com> writes: > > Hello, I have an application that wants to repeatedly schedule > > callbacks into the QT event loop. With pyside, memory usage grows > > over time, as python doesn't appear to be able to free things up. > > objgraph shows a growing number of QTimer objects not being collected. > > With pyqt, this is not a problem, and neither is it with a C++ > > transliteration. > > > > I'm using pyside 1.2.1 on ubuntu 14.04. My demonstration application > > is below. > > > > Am I doing something wrong? > > > I just tested your example on Windows 8.0, Python 32-bit with PySide 1.2.2 > and see no memory leak. Might be worth updating to 1.2.2 just in case, > otherwise it looks to be a platform specific issue. > > I don't believe you are doing anything wrong though. The QTimer should post > an event to the Qt Event loop, and the Python function should then end and > be garbage collected (along with everything in it that Python owns). The QT > Event loop will then run the test function again. The singleShot() method of > QTimer doesn't return a reference to the QTimer created anyway, so Python > shouldn't really be holding onto any QTimer references I would have thought. Thanks for giving it a try. I ended up working around the problem by using a signal connected to a slot with a QueuedConnection, which didn't seem to leak anything. I'll try to update to 1.2.2 at some point here and will report back if anything has changed. Regards, Josh From david.anes at gmail.com Sun Jun 15 20:22:07 2014 From: david.anes at gmail.com (David Anes) Date: Sun, 15 Jun 2014 20:22:07 +0200 Subject: [PySide] Any workaround to access QtCore.MSG "message" field? Message-ID: There is a bug (PYSIDE-84: https://bugreports.qt-project.org/browse/PYSIDE-84) that states that PySide.QtCore.MSG.message field (and wParam) is not populated... while this is sorted out, QCoreApplication::winEventFilter is unusable. Has anyone had the chance to find a workaround to access the message type somehow? I would like even to read about "hackish" ways to achieve it. Thank you a lot in advance. David. -- David "kraptor" Anes Alcolea * @kraptor @simlaps * linkedin.com/in/davidanes * kraptor.com | simlaps.com | 900grados.es -------------- next part -------------- An HTML attachment was scrubbed... URL: From gadiyar at ti.com Mon Jun 16 07:56:44 2014 From: gadiyar at ti.com (Gadiyar, Anand) Date: Mon, 16 Jun 2014 05:56:44 +0000 Subject: [PySide] Any workaround to access QtCore.MSG "message" field? In-Reply-To: References: Message-ID: David, I had posted this patch to gerrit last year. https://codereview.qt-project.org/#/c/67938/ John Ehresman had a comment that I had not followed up on. I’ll take another look at it and try to address his comment this week – I had forgotten about it. But the patch I posted works for me on Win7 x64 with both 32-bit and 64-bit builds of PySide. Hope it helps, Anand From: pyside-bounces+gadiyar=ti.com at qt-project.org [mailto:pyside-bounces+gadiyar=ti.com at qt-project.org] On Behalf Of David Anes Sent: Sunday, June 15, 2014 11:52 PM To: pyside at qt-project.org Subject: [PySide] Any workaround to access QtCore.MSG "message" field? There is a bug (PYSIDE-84: https://bugreports.qt-project.org/browse/PYSIDE-84) that states that PySide.QtCore.MSG.message field (and wParam) is not populated... while this is sorted out, QCoreApplication::winEventFilter is unusable. Has anyone had the chance to find a workaround to access the message type somehow? I would like even to read about "hackish" ways to achieve it. Thank you a lot in advance. David. -- David "kraptor" Anes Alcolea * @kraptor @simlaps * linkedin.com/in/davidanes * kraptor.com | simlaps.com | 900grados.es -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.anes at gmail.com Mon Jun 16 23:23:41 2014 From: david.anes at gmail.com (David Anes) Date: Mon, 16 Jun 2014 23:23:41 +0200 Subject: [PySide] Any workaround to access QtCore.MSG "message" field? In-Reply-To: References: Message-ID: HI Anand. I completely missed that one, as I didn't find the patch after a lot of googling around. I'll try it out. Thank you. Meanwhile, if you need help testing or anything to help you aout, let me know as I want to contribute to PySide. Thank you so much! David. 2014-06-16 7:56 GMT+02:00 Gadiyar, Anand : > David, > > > > I had posted this patch to gerrit last year. > > https://codereview.qt-project.org/#/c/67938/ > > > > John Ehresman had a comment that I had not followed up on. I’ll take > another look at it and try to address his comment this week – I had > forgotten about it. But the patch I posted works for me on Win7 x64 with > both 32-bit and 64-bit builds of PySide. > > > > Hope it helps, > > Anand > > > > > > *From:* pyside-bounces+gadiyar=ti.com at qt-project.org [mailto: > pyside-bounces+gadiyar=ti.com at qt-project.org] *On Behalf Of *David Anes > *Sent:* Sunday, June 15, 2014 11:52 PM > *To:* pyside at qt-project.org > *Subject:* [PySide] Any workaround to access QtCore.MSG "message" field? > > > > There is a bug (PYSIDE-84: > https://bugreports.qt-project.org/browse/PYSIDE-84) that states that > PySide.QtCore.MSG.message field (and wParam) is not populated... while this > is sorted out, QCoreApplication::winEventFilter is unusable. > > > > Has anyone had the chance to find a workaround to access the message type > somehow? I would like even to read about "hackish" ways to achieve it. > > > > Thank you a lot in advance. > > David. > > > > -- > > David "kraptor" Anes Alcolea > * @kraptor @simlaps > > > * linkedin.com/in/davidanes > * kraptor.com | simlaps.com | 900grados.es > -- David "kraptor" Anes Alcolea * @kraptor @simlaps * linkedin.com/in/davidanes * kraptor.com | simlaps.com | 900grados.es -------------- next part -------------- An HTML attachment was scrubbed... URL: From techtonik at gmail.com Tue Jun 17 10:06:22 2014 From: techtonik at gmail.com (anatoly techtonik) Date: Tue, 17 Jun 2014 11:06:22 +0300 Subject: [PySide] Run GUI Window in a separate thread (independent main loop) Message-ID: Hi, I have a standard Python script - not PySide app - that executes command with subprocess.Popen. And I want to create a monitor for it in a separate thread, which will empty stderr and stdin to avoid deadlocks. The question is - is it ok to create a PySide window in this thread? I need it to see the actual stderr/stdout output. I am afraid that executing app.exec_() in a separate thread will make horrible things happen. It may also happen that I need to run two processes with two separate monitor threads. -- anatoly t. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at qtrac.eu Wed Jun 18 12:48:54 2014 From: mark at qtrac.eu (Mark Summerfield) Date: Wed, 18 Jun 2014 11:48:54 +0100 Subject: [PySide] QTextEdit.setPalette() only works once Message-ID: <20140618114854.4755d528@dino> Hi, I have a QLineEdit (self.lineEdit) and a QTextEdit (self.textEdit) and after creating them I call this custom method: def changeBackground(self, bg): palette = self.lineEdit.palette() palette.setBrush(QPalette.Base, QBrush(bg)) self.lineEdit.setPalette(palette) palette = self.textEdit.palette() palette.setBrush(QPalette.Base, QBrush(bg)) self.textEdit.setPalette(palette) The bg is either a QColor or a QPixmap. The first time I call this it works fine. But the second and subsequent times I call it, it works correctly for the QLineEdit, but has no effect on the QTextEdit. I'm using: Windows 7 - Python 3.3 - PySide 1.2.2 - Qt 4.8.5 Linux - Python 3.2 - PySide 1.1.1 - Qt 4.8.2 I've reported it as a Qt bug: https://bugreports.qt-project.org/browse/QTBUG-39727 but was wondering if anyone can suggest a workaround? Thanks. PS autoFillBackground has no effect either way. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu Python and PyQt/PySide - training and consultancy "Python in Practice" - ISBN 978-0321905635 http://www.qtrac.eu/pipbook.html From mark at qtrac.eu Wed Jun 18 14:32:19 2014 From: mark at qtrac.eu (Mark Summerfield) Date: Wed, 18 Jun 2014 13:32:19 +0100 Subject: [PySide] QTextEdit.setPalette() only works once [SOLVED] In-Reply-To: <20140618114854.4755d528@dino> References: <20140618114854.4755d528@dino> Message-ID: <20140618133219.264dc3cb@dino> Hi, This isn't a bug and here's the solution. Call QTextEdit.setAttribute(Qt.WA_TranslucentBackground) once when the text edit is created, and then get and set the QTextEdit.viewport()'s palette. (I've closed the bug report.) On Wed, 18 Jun 2014 11:48:54 +0100 Mark Summerfield wrote: > Hi, > > I have a QLineEdit (self.lineEdit) and a QTextEdit (self.textEdit) and > after creating them I call this custom method: > > def changeBackground(self, bg): > palette = self.lineEdit.palette() > palette.setBrush(QPalette.Base, QBrush(bg)) > self.lineEdit.setPalette(palette) > > palette = self.textEdit.palette() > palette.setBrush(QPalette.Base, QBrush(bg)) > self.textEdit.setPalette(palette) > > The bg is either a QColor or a QPixmap. > > The first time I call this it works fine. > > But the second and subsequent times I call it, it works correctly for > the QLineEdit, but has no effect on the QTextEdit. > > I'm using: > Windows 7 - Python 3.3 - PySide 1.2.2 - Qt 4.8.5 > Linux - Python 3.2 - PySide 1.1.1 - Qt 4.8.2 > > I've reported it as a Qt bug: > https://bugreports.qt-project.org/browse/QTBUG-39727 > > but was wondering if anyone can suggest a workaround? > > Thanks. > > PS autoFillBackground has no effect either way. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu Python and PyQt/PySide - training and consultancy "Programming in Python 3" - ISBN 0321680561 http://www.qtrac.eu/py3book.html From david.anes at gmail.com Wed Jun 18 18:43:07 2014 From: david.anes at gmail.com (David Anes) Date: Wed, 18 Jun 2014 18:43:07 +0200 Subject: [PySide] Any workaround to access QtCore.MSG "message" field? In-Reply-To: References: Message-ID: Hi. I patched the MSG struct following John Ehresman and Anand messages here: https://codereview.qt-project.org/#/c/67938/ I included the patch attached that fixes PYSIDE-84 bug: https://bugreports.qt-project.org/browse/PYSIDE-84 Tested on win8 32bit and win8.1 64bit (with Python 2.7.7): https://dl.dropboxusercontent.com/u/22516050/PySide-1.3.0dev.win32-py2.7.exe Anyone can test it in win7 and other possibly affected environments and push this upstream? Thank you. David. 2014-06-16 23:23 GMT+02:00 David Anes : > HI Anand. > > I completely missed that one, as I didn't find the patch after a lot of > googling around. > > I'll try it out. Thank you. > > Meanwhile, if you need help testing or anything to help you aout, let me > know as I want to contribute to PySide. > > Thank you so much! > David. > > > 2014-06-16 7:56 GMT+02:00 Gadiyar, Anand : > > David, >> >> >> >> I had posted this patch to gerrit last year. >> >> https://codereview.qt-project.org/#/c/67938/ >> >> >> >> John Ehresman had a comment that I had not followed up on. I’ll take >> another look at it and try to address his comment this week – I had >> forgotten about it. But the patch I posted works for me on Win7 x64 with >> both 32-bit and 64-bit builds of PySide. >> >> >> >> Hope it helps, >> >> Anand >> >> >> >> >> >> *From:* pyside-bounces+gadiyar=ti.com at qt-project.org [mailto: >> pyside-bounces+gadiyar=ti.com at qt-project.org] *On Behalf Of *David Anes >> *Sent:* Sunday, June 15, 2014 11:52 PM >> *To:* pyside at qt-project.org >> *Subject:* [PySide] Any workaround to access QtCore.MSG "message" field? >> >> >> >> There is a bug (PYSIDE-84: >> https://bugreports.qt-project.org/browse/PYSIDE-84) that states that >> PySide.QtCore.MSG.message field (and wParam) is not populated... while this >> is sorted out, QCoreApplication::winEventFilter is unusable. >> >> >> >> Has anyone had the chance to find a workaround to access the message type >> somehow? I would like even to read about "hackish" ways to achieve it. >> >> >> >> Thank you a lot in advance. >> >> David. >> >> >> >> -- >> >> David "kraptor" Anes Alcolea >> * @kraptor @simlaps >> >> >> * linkedin.com/in/davidanes >> * kraptor.com | simlaps.com | 900grados.es >> > > > > -- > David "kraptor" Anes Alcolea > * @kraptor @simlaps > > * linkedin.com/in/davidanes > * kraptor.com | simlaps.com | 900grados.es > > -- David "kraptor" Anes Alcolea * @kraptor @simlaps * linkedin.com/in/davidanes * kraptor.com | simlaps.com | 900grados.es -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MSG-wparam-and-message-types-Fix-PYSIDE84.patch Type: application/octet-stream Size: 718 bytes Desc: not available URL: From tismer at stackless.com Wed Jun 18 21:06:06 2014 From: tismer at stackless.com (Christian Tismer) Date: Wed, 18 Jun 2014 21:06:06 +0200 Subject: [PySide] PySide 1.2.2 OS/X wheels for intel In-Reply-To: <535EB793.6040305@stackless.com> References: <535EB793.6040305@stackless.com> Message-ID: <53A1E31E.9060605@stackless.com> On 28.04.14 22:18, Christian Tismer wrote: > Hi, > > Wheels and eggs for python 2.6 2.7 3.3 3.4 > compiled for OS/X 10.6 10.7 10.8 10.9 are built and uploaded. > We got noticed that the existing wheels don't work with the CPython installer. We now build the 10.6 version of PySide against an universal build, like you would download from python.org . Example: PySide-1.2.2-cp34-cp34m-macosx_10_6_x86_64.whl did not install with python.org's binary, but the new PySide-1.2.2-cp34-cp34m-macosx_10_6_intel.whl works with it. Now you can download Python from python.org, install pip and do ``` pip install pyside pyside_postinstall.py -install ``` -- Christian Tismer :^) tismer at stackless.com Software Consulting : http://www.stackless.com/ Karl-Liebknecht-Str. 121 : http://www.pydica.net/ 14482 Potsdam : GPG key -> 0xFB7BEE0E phone +49 173 24 18 776 fax +49 (30) 700143-0023