From a.richi at bluewin.ch Fri Feb 1 00:00:03 2013 From: a.richi at bluewin.ch (Aaron Richiger) Date: Fri, 01 Feb 2013 00:00:03 +0100 Subject: [PySide] Moving up a tree In-Reply-To: References: Message-ID: <510AF773.2020408@bluewin.ch> Hello! As John already mentioned: Some code would have been great and often says more than many words... One central unclear point is whether you are using QTreeWidget or QTreeView. I took the 50/50 joker, guessed a QTreeWidget :-) and wrote a simple example that does what you are looking for (getting parents and inserting new items around the clicked item): ################### tree_example.py ######################## #!/usr/bin/python import sys from PySide.QtGui import * class TreeWidgetExample(QTreeWidget): """ Tree widget to demostrate getting all parents of a clicked item and to demonstrate inserting new items around the clicked item. """ def __init__(self, parent=None): super(TreeWidgetExample, self).__init__(parent) self.setColumnCount(2) self.setHeaderLabels(["Node", "Value"]) self.build_tree() def build_tree(self): """Builds the tree according to your example on the Mailing list.""" value = "example value" # root items nodeA = QTreeWidgetItem(self, ["A", value]) nodeB = QTreeWidgetItem(self, ["B", value]) # items on first child level node1 = QTreeWidgetItem(nodeA, ["1", value]) node2 = QTreeWidgetItem(nodeA, ["2", value]) node3 = QTreeWidgetItem(nodeB, ["3", value]) node4 = QTreeWidgetItem(nodeB, ["4", value]) # items on second child level QTreeWidgetItem(node1, ["a", value]) QTreeWidgetItem(node1, ["b", value]) QTreeWidgetItem(node2, ["c", value]) QTreeWidgetItem(node2, ["d", value]) QTreeWidgetItem(node3, ["e", value]) QTreeWidgetItem(node3, ["f", value]) QTreeWidgetItem(node4, ["g", value]) QTreeWidgetItem(node4, ["h", value]) self.itemClicked.connect(self.onItem) def onItem(self, item, column_nr): """ Slot to be called if an item was clicked. Adds 2 new items to the tree and prints information about the item and it's parents. """ # Comment this out, if you do not like having more and more items... self.addItems(item) print "Node %s clicked in column nr %d" % (item.text(0), column_nr) print "\tParents: " + str([str("Node %s" % node.text(0)) for node in self.getParents(item)]) print def getParents(self, item): """ Return a list containing all parent items of this item. The list is empty, if the item is a root item. """ parents = [] current_item = item current_parent = current_item.parent() # Walk up the tree and collect all parent items of this item while not current_parent is None: parents.append(current_parent) current_item = current_parent current_parent = current_item.parent() return parents def addItems(self, item): """ Inserts 2 items for demonstration purpose: - 1 on the same level as the clicked item - 1 as a child of the clicked item """ parents = self.getParents(item) direct_parent = parents[0] if parents else self QTreeWidgetItem(direct_parent, ["new1", "New node on same level"]) QTreeWidgetItem(item, ["new2", "New node on child level"]) def main(): app = QApplication(sys.argv) ex = TreeWidgetExample() ex.show() sys.exit(app.exec_()) if __name__ == '__main__': main() #################### end of code ############################## I hope it helps! Aaron > Ok since last email I don't even understand my question, so I don't > know how I expect you to. > > Let's try this again. > > I am using python, pyside, QT. I have an GUI that displays some data > in a Tree structure, with drop down arrows. The structure resembles a > file structure with 'files' and 'subfiles'. So in the GUI if I click > on an item in the tree structure, I can get it to display the name of > the item selected, but when I try to find it's parent and top parent I > can't figure it out. > Same example as before. > A > 1 > a > b > 2 > B > 3 > c > 4 > C > 5 > 6 > d > e > > So let's say I click on 'e' in the GUI, I can get it to identify that > I selected 'e', but when I try to get the parents, 6 and C, I get 'd', > '6', '5', 'C', 'B', 'A' > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -------------- next part -------------- An HTML attachment was scrubbed... URL: From purplish.tentacle at gmail.com Fri Feb 1 00:16:49 2013 From: purplish.tentacle at gmail.com (Purple Tentacle) Date: Fri, 1 Feb 2013 08:16:49 +0900 Subject: [PySide] ImportError when importing from the PySide Egg Message-ID: Hello everyone, I followed the instructions for building a standalone PySide egg in Linux. Then I moved the egg to a test directory along with a Python script to test it. I want to be able to access the egg from the current directory, not from the Python dir. The PySide package is found but I get an "ImportError: No module named QtCore" when I try to import QtCore, or a similar message for any other module. PySide.__all__ has ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']. The test script: #!/usr/bin/python import sys sys.path.append('./PySide-1.1.3dev-py2.7.egg') import PySide print(PySide.__all__) import PySide.QtCore Am I missing something something? Thanks!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From backup.rlacko at gmail.com Fri Feb 1 00:32:00 2013 From: backup.rlacko at gmail.com (Roman Lacko) Date: Fri, 1 Feb 2013 00:32:00 +0100 Subject: [PySide] ImportError when importing from the PySide Egg In-Reply-To: References: Message-ID: Hi, you need to install the PySIde egg with easy_install: $ easy_install PySide-1.1.3dev-py2.7.egg If you don't want to install PySide into system python, you can use virtualenv. Regards Roman 2013/2/1 Purple Tentacle > Hello everyone, > > I followed the instructions for > building a standalone PySide egg in Linux. Then I moved the egg to a test > directory along with a Python script to test it. I want to be able to > access the egg from the current directory, not from the Python dir. > > The PySide package is found but I get an "ImportError: No module named > QtCore" when I try to import QtCore, or a similar message for any other > module. PySide.__all__ has ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', > 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']. > > The test script: > #!/usr/bin/python > import sys > sys.path.append('./PySide-1.1.3dev-py2.7.egg') > import PySide > print(PySide.__all__) > import PySide.QtCore > > Am I missing something something? Thanks!! > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From purplish.tentacle at gmail.com Sat Feb 2 09:21:49 2013 From: purplish.tentacle at gmail.com (Purple Tentacle) Date: Sat, 2 Feb 2013 17:21:49 +0900 Subject: [PySide] ImportError when importing from the PySide Egg In-Reply-To: References: Message-ID: Aaron, yes I had used the --standalone flag with setup.py Roman, that worked. So I executed: easy_install --install-dir=$PYTHONDIR/site-packages/ PySide-1.1.3dev-py2.7.egg Thanks guys! On Fri, Feb 1, 2013 at 8:32 AM, Roman Lacko wrote: > Hi, > you need to install the PySIde egg with easy_install: > > $ easy_install PySide-1.1.3dev-py2.7.egg > > If you don't want to install PySide into system python, you can use > virtualenv. > > Regards > Roman > > 2013/2/1 Purple Tentacle > >> Hello everyone, >> >> I followed the instructions for >> building a standalone PySide egg in Linux. Then I moved the egg to a test >> directory along with a Python script to test it. I want to be able to >> access the egg from the current directory, not from the Python dir. >> >> The PySide package is found but I get an "ImportError: No module named >> QtCore" when I try to import QtCore, or a similar message for any other >> module. PySide.__all__ has ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', >> 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']. >> >> The test script: >> #!/usr/bin/python >> import sys >> sys.path.append('./PySide-1.1.3dev-py2.7.egg') >> import PySide >> print(PySide.__all__) >> import PySide.QtCore >> >> Am I missing something something? Thanks!! >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vihorev at gmail.com Sat Feb 2 09:27:43 2013 From: vihorev at gmail.com (Alexey Vihorev) Date: Sat, 2 Feb 2013 10:27:43 +0200 Subject: [PySide] One signal name, different arguments. Message-ID: <000001ce011f$2c7dd0e0$857972a0$@gmail.com> Hi all. I'm trying to use QCompleter class, and the problem is it has two signals with the same name but different arguments: void QCompleter::activated ( const QString & text ) [signal] void QCompleter::activated ( const QModelIndex & index ) [signal] If I use it like completer.activated.connect(my_func)then my_func will get the string argument, but I need QModelIndex. Decorating my_func with @QtCore.Slot(QtCore.QModelIndex)did not help. Any thoughts? -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.kittner at gmail.com Sat Feb 2 10:00:12 2013 From: andy.kittner at gmail.com (Andy Kittner) Date: Sat, 2 Feb 2013 10:00:12 +0100 Subject: [PySide] One signal name, different arguments. In-Reply-To: <000001ce011f$2c7dd0e0$857972a0$@gmail.com> References: <000001ce011f$2c7dd0e0$857972a0$@gmail.com> Message-ID: <20130202090012.GA7420@mancubus.hell> On Sat, Feb 02, 2013 at 10:27:43AM +0200, Alexey Vihorev wrote: >Hi all. > >I'm trying to use QCompleter class, and the problem is it has two signals >with the same name but different arguments: > > > >void QCompleter::activated ( const QString > & text ) [signal] > >void QCompleter::activated ( const QModelIndex > & index ) [signal] > > > >If I use it like completer.activated.connect(my_func)then my_func will get >the string argument, but I need QModelIndex. Decorating my_func with >@QtCore.Slot(QtCore.QModelIndex)did not help. Any thoughts? IIRC you can add the type signature when connecting the signal like this: completer.activated[QtCore.QModelIndex].connect(myfunc) Regards, Andy -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From vihorev at gmail.com Sat Feb 2 11:18:39 2013 From: vihorev at gmail.com (Alexey Vihorev) Date: Sat, 2 Feb 2013 12:18:39 +0200 Subject: [PySide] One signal name, different arguments. In-Reply-To: <20130202090012.GA7420@mancubus.hell> References: <000001ce011f$2c7dd0e0$857972a0$@gmail.com> <20130202090012.GA7420@mancubus.hell> Message-ID: <000b01ce012e$abe1d2f0$03a578d0$@gmail.com> Thanks, it works! -----Original Message----- From: Andy Kittner [mailto:andy.kittner at gmail.com] Sent: Saturday, February 02, 2013 11:00 AM To: Alexey Vihorev Cc: pyside at qt-project.org Subject: Re: [PySide] One signal name, different arguments. On Sat, Feb 02, 2013 at 10:27:43AM +0200, Alexey Vihorev wrote: >Hi all. > >I'm trying to use QCompleter class, and the problem is it has two >signals with the same name but different arguments: > > > >void QCompleter::activated ( const QString > & text ) [signal] > >void QCompleter::activated ( const QModelIndex > & index ) [signal] > > > >If I use it like completer.activated.connect(my_func)then my_func will >get the string argument, but I need QModelIndex. Decorating my_func >with @QtCore.Slot(QtCore.QModelIndex)did not help. Any thoughts? IIRC you can add the type signature when connecting the signal like this: completer.activated[QtCore.QModelIndex].connect(myfunc) Regards, Andy From wojtek.danilo.ml at gmail.com Mon Feb 4 04:01:07 2013 From: wojtek.danilo.ml at gmail.com (=?ISO-8859-2?Q?Wojciech_Dani=B3o?=) Date: Mon, 4 Feb 2013 04:01:07 +0100 Subject: [PySide] qtquick 2.0 status In-Reply-To: References: Message-ID: How big this donation should be to make the pyside be compatible with qtqucik2.0? I'm currently a student, but if more peaople will be interested in this feature, maybe we will get the money :) 2013/1/31 anatoly techtonik > On Mon, Jan 28, 2013 at 2:56 AM, Wojciech Daniło < > wojtek.danilo.ml at gmail.com> wrote: > >> Hi! is it possible to use qtquick 2.0 with pyside? >> If not, do you know when it will be? >> > > Without some support from interested parties, probably not soon. > > >> I'm curently developing big project with pyside and qtquick support is >> very crucial for me. >> > > Will the public donation mechanism be useful to show how critical is this > part for you? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.klaver at gmail.com Sat Feb 16 02:26:20 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Fri, 15 Feb 2013 17:26:20 -0800 Subject: [PySide] QSqlRelationalTableModel Message-ID: <511EE03C.30003@gmail.com> When using QSqlRelationalTableModel and then setting QSqlRelationalDelegate on the view is it possible to have the display name sorted? Thanks, -- Adrian Klaver adrian.klaver at gmail.com From david at wireplant.com Sat Feb 16 07:12:14 2013 From: david at wireplant.com (david) Date: Sat, 16 Feb 2013 01:12:14 -0500 Subject: [PySide] Shiboken build failed Message-ID: <20130216061214.GA11544@wireplant.com> I'm attempting to cross compile PySide for a mini6410 ARM11 SBC, but I'm running into an error compiling Shiboken. cmake output: david at devbox:~/Downloads/shiboken-1.1.2$ cmake . -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- 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 Qt-Version 4.8.4 (using /usr/local/bin/qmake) -- Found PythonLibs: /usr/lib/libpython2.6.so -- Found LibXml2: /usr/lib/libxml2.so -- checking for module 'libxslt' -- found libxslt, version 1.1.26 -- Found LibXslt: /usr/lib/libxslt.so -- sphinx-build - not found! doc target disabled -- Tests will be generated using the protected hack! -- Found PythonInterp: /usr/bin/python2.6 -- Configuring done -- Generating done -- Build files have been written to: /home/david/Downloads/shiboken-1.1.2 make output: david at devbox:~/Downloads/shiboken-1.1.2$ make CROSS_COMPILE=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi- [ 1%] Generating qrc_generator.cxx [ 1%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o In file included from /usr/local/include/QtCore/qatomic_arm.h:70, from /usr/local/include/QtCore/qatomic_arch.h:56, from /usr/local/include/QtCore/qbasicatomic.h:227, from /usr/local/include/QtCore/qatomic.h:46, from /usr/local/include/QtCore/qhash.h:45, from /usr/local/include/QtCore/QHash:1, from /home/david/Downloads/shiboken-1.1.2/ApiExtractor/typesystem.h:27, from /home/david/Downloads/shiboken-1.1.2/ApiExtractor/abstractmetalang.h:27, from /home/david/Downloads/shiboken-1.1.2/ApiExtractor/apiextractor.h:28, from /home/david/Downloads/shiboken-1.1.2/ApiExtractor/apiextractor.cpp:24: /usr/local/include/QtCore/qatomic_armv5.h: In member function .int QBasicAtomicInt::fetchAndStoreOrdered(int).: /usr/local/include/QtCore/qatomic_armv5.h:236: error: .count. was not declared in this scope /usr/local/include/QtCore/qatomic_armv5.h: In member function .T* QBasicAtomicPointer::fetchAndStoreOrdered(T*).: /usr/local/include/QtCore/qatomic_armv5.h:373: error: .count. was not declared in this scope make[2]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o] Error 1 make[1]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/all] Error 2 make: *** [all] Error 2 From adrian.klaver at gmail.com Sun Feb 17 00:19:06 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sat, 16 Feb 2013 15:19:06 -0800 Subject: [PySide] DataMapper issues Message-ID: <512013EA.7050501@gmail.com> OpenSuse 12.2 pyside 1.1.2-1.11 Python 2.7.3 I have the following and it will not save the data to the database: class PlantForm(QtGui.QMainWindow): def __init__(self, parent=None): super(PlantForm, self).__init__(parent) loader = QtUiTools.QUiLoader() self.ui = loader.load("/home/aklaver/software_projects/greenhouse_app/python_code/plant_app_qt/forms/plant_form.ui") self.model = QtSql.QSqlTableModel(self, db=db) self.model.setTable("plant1") self.model.setSort(0, QtCore.Qt.AscendingOrder) self.model.setEditStrategy(self.model.OnManualSubmit) self.model.select() self.dm = QtGui.QDataWidgetMapper(self) self.dm.setSubmitPolicy(self.dm.ManualSubmit) self.dm.setModel(self.model) self.dm.addMapping(self.ui.plantNoLi, 0) self.dm.addMapping(self.ui.commonLi, 1) self.dm.addMapping(self.ui.genusLi, 2) self.dm.addMapping(self.ui.speciesLi, 3) self.dm.toFirst() self.saveBtn = self.ui.saveBtn self.saveBtn.clicked.connect(self.model.submitAll) self.ui.show() self.center() def center(self): qr = self.frameGeometry() cp = QtGui.QDesktopWidget().availableGeometry().center() qr.moveCenter(cp) self.move(qr.topLeft()) I am obviously missing something, I am just not sure what? I tried the above with OnFieldChange for the model and AutoSubmit for the DataMapper. When I opened the form the first field would update to its existing value bit then I could not change anything. The changed value stick in the widget, they just do not get to the database. Thanks, -- Adrian Klaver adrian.klaver at gmail.com From adrian.klaver at gmail.com Sun Feb 17 02:28:22 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sat, 16 Feb 2013 17:28:22 -0800 Subject: [PySide] PySide really is dead Message-ID: <51203236.3020308@gmail.com> From the lack of responses I would say this project is moribund. -- Adrian Klaver adrian.klaver at gmail.com From vasure at gmail.com Sun Feb 17 04:01:03 2013 From: vasure at gmail.com (Srini Kommoori) Date: Sat, 16 Feb 2013 19:01:03 -0800 Subject: [PySide] DataMapper issues In-Reply-To: <512013EA.7050501@gmail.com> References: <512013EA.7050501@gmail.com> Message-ID: Can you set/get the sql db using python? As you are on Python, I would use sqlalchemy or native python bindings for the sql interface and test it out. On Sat, Feb 16, 2013 at 3:19 PM, Adrian Klaver wrote: > OpenSuse 12.2 > pyside 1.1.2-1.11 > Python 2.7.3 > > I have the following and it will not save the data to the database: > > class PlantForm(QtGui.QMainWindow): > def __init__(self, parent=None): > super(PlantForm, self).__init__(parent) > loader = QtUiTools.QUiLoader() > self.ui = > > loader.load("/home/aklaver/software_projects/greenhouse_app/python_code/plant_app_qt/forms/plant_form.ui") > self.model = QtSql.QSqlTableModel(self, db=db) > self.model.setTable("plant1") > self.model.setSort(0, QtCore.Qt.AscendingOrder) > self.model.setEditStrategy(self.model.OnManualSubmit) > self.model.select() > self.dm = QtGui.QDataWidgetMapper(self) > self.dm.setSubmitPolicy(self.dm.ManualSubmit) > self.dm.setModel(self.model) > self.dm.addMapping(self.ui.plantNoLi, 0) > self.dm.addMapping(self.ui.commonLi, 1) > self.dm.addMapping(self.ui.genusLi, 2) > self.dm.addMapping(self.ui.speciesLi, 3) > self.dm.toFirst() > self.saveBtn = self.ui.saveBtn > self.saveBtn.clicked.connect(self.model.submitAll) > self.ui.show() > self.center() > > def center(self): > qr = self.frameGeometry() > cp = QtGui.QDesktopWidget().availableGeometry().center() > qr.moveCenter(cp) > self.move(qr.topLeft()) > > I am obviously missing something, I am just not sure what? > I tried the above with OnFieldChange for the model and AutoSubmit for > the DataMapper. When I opened the form the first field would update to > its existing value bit then I could not change anything. The changed > value stick in the widget, they just do not get to the database. > > Thanks, > > -- > Adrian Klaver > adrian.klaver at gmail.com > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vasure at gmail.com Sun Feb 17 04:05:21 2013 From: vasure at gmail.com (Srini Kommoori) Date: Sat, 16 Feb 2013 19:05:21 -0800 Subject: [PySide] PySide really is dead In-Reply-To: <51203236.3020308@gmail.com> References: <51203236.3020308@gmail.com> Message-ID: Well this is a harsh email and a loose comment. You had a problem 3 hours ago which you could easily resolve if you spend some time debugging it. On Sat, Feb 16, 2013 at 5:28 PM, Adrian Klaver wrote: > From the lack of responses I would say this project is moribund. > -- > Adrian Klaver > adrian.klaver at gmail.com > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.klaver at gmail.com Sun Feb 17 04:05:30 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sat, 16 Feb 2013 19:05:30 -0800 Subject: [PySide] DataMapper issues In-Reply-To: References: <512013EA.7050501@gmail.com> Message-ID: <512048FA.8060402@gmail.com> On 02/16/2013 07:01 PM, Srini Kommoori wrote: > Can you set/get the sql db using python? > > As you are on Python, I would use sqlalchemy or native python bindings > for the sql interface and test it out. The database connection works. I get the correct values in the lineEdit widgets. As I mentioned when I set up OnFieldChange and AutoSubmit the form would update the first field on entry. > > > > On Sat, Feb 16, 2013 at 3:19 PM, Adrian Klaver > wrote: > > OpenSuse 12.2 > pyside 1.1.2-1.11 > Python 2.7.3 > > I have the following and it will not save the data to the database: > > class PlantForm(QtGui.QMainWindow): > def __init__(self, parent=None): > super(PlantForm, self).__init__(parent) > loader = QtUiTools.QUiLoader() > self.ui = > loader.load("/home/aklaver/software_projects/greenhouse_app/python_code/plant_app_qt/forms/plant_form.ui") > self.model = QtSql.QSqlTableModel(self, db=db) > self.model.setTable("plant1") > self.model.setSort(0, QtCore.Qt.AscendingOrder) > self.model.setEditStrategy(self.model.OnManualSubmit) > self.model.select() > self.dm = QtGui.QDataWidgetMapper(self) > self.dm.setSubmitPolicy(self.dm.ManualSubmit) > self.dm.setModel(self.model) > self.dm.addMapping(self.ui.plantNoLi, 0) > self.dm.addMapping(self.ui.commonLi, 1) > self.dm.addMapping(self.ui.genusLi, 2) > self.dm.addMapping(self.ui.speciesLi, 3) > self.dm.toFirst() > self.saveBtn = self.ui.saveBtn > self.saveBtn.clicked.connect(self.model.submitAll) > self.ui.show() > self.center() > > def center(self): > qr = self.frameGeometry() > cp = QtGui.QDesktopWidget().availableGeometry().center() > qr.moveCenter(cp) > self.move(qr.topLeft()) > > I am obviously missing something, I am just not sure what? > I tried the above with OnFieldChange for the model and AutoSubmit for > the DataMapper. When I opened the form the first field would update to > its existing value bit then I could not change anything. The changed > value stick in the widget, they just do not get to the database. > > Thanks, > > -- > Adrian Klaver > adrian.klaver at gmail.com > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -- Adrian Klaver adrian.klaver at gmail.com From adrian.klaver at gmail.com Sun Feb 17 04:07:14 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sat, 16 Feb 2013 19:07:14 -0800 Subject: [PySide] PySide really is dead In-Reply-To: References: <51203236.3020308@gmail.com> Message-ID: <51204962.4060508@gmail.com> On 02/16/2013 07:05 PM, Srini Kommoori wrote: > Well this is a harsh email and a loose comment. > > You had a problem 3 hours ago which you could easily resolve if you > spend some time debugging it. Probably harsh, but my first post was more than 24 hours ago(different topic) and I have spent a good part of yesterday and today troubleshooting to no avail. -- Adrian Klaver adrian.klaver at gmail.com From techtonik at gmail.com Sun Feb 17 15:01:29 2013 From: techtonik at gmail.com (anatoly techtonik) Date: Sun, 17 Feb 2013 17:01:29 +0300 Subject: [PySide] PySide really is dead In-Reply-To: <51204962.4060508@gmail.com> References: <51203236.3020308@gmail.com> <51204962.4060508@gmail.com> Message-ID: On Sun, Feb 17, 2013 at 6:07 AM, Adrian Klaver wrote: > On 02/16/2013 07:05 PM, Srini Kommoori wrote: > > Well this is a harsh email and a loose comment. > > > > You had a problem 3 hours ago which you could easily resolve if you > > spend some time debugging it. > > Probably harsh, but my first post was more than 24 hours ago(different > topic) and I have spent a good part of yesterday and today > troubleshooting to no avail. Don't you afraid of voices in your head while visiting the graveyard? =) -- anatoly t. -------------- next part -------------- An HTML attachment was scrubbed... URL: From techtonik at gmail.com Sun Feb 17 15:22:43 2013 From: techtonik at gmail.com (anatoly techtonik) Date: Sun, 17 Feb 2013 17:22:43 +0300 Subject: [PySide] DataMapper issues In-Reply-To: <512048FA.8060402@gmail.com> References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> Message-ID: Hi Adrian, The detection of root cause of this bug is impossible using method of static analysis of your snippet. You need to strip it to the bare bones example that can be executed on the systems other that OpenSuse 12.2 to confirm the bug is not affected by operating system configuration / combination of versions of DB and binding packages. It will help to maintain an instruction on PySide wiki how to create such testing environment so that the operation can be followed and automated for future use. As you're the most interested person in what. Mind you that writing this 'fixture creating guide' and clearing place for it does not guarantee that your particular problem is easy enough (or feasible) to by tracked and solved. But it may increase the chances up to 80% depending on the complexity, and will lower the barrier for PySide contributors, who are not yet (but may be) able to solve your problem. -- anatoly t. On Sun, Feb 17, 2013 at 6:05 AM, Adrian Klaver wrote: > On 02/16/2013 07:01 PM, Srini Kommoori wrote: > > Can you set/get the sql db using python? > > > > As you are on Python, I would use sqlalchemy or native python bindings > > for the sql interface and test it out. > > The database connection works. I get the correct values in the lineEdit > widgets. As I mentioned when I set up OnFieldChange and AutoSubmit the > form would update the first field on entry. > > > > > > > > On Sat, Feb 16, 2013 at 3:19 PM, Adrian Klaver > > wrote: > > > > OpenSuse 12.2 > > pyside 1.1.2-1.11 > > Python 2.7.3 > > > > I have the following and it will not save the data to the database: > > > > class PlantForm(QtGui.QMainWindow): > > def __init__(self, parent=None): > > super(PlantForm, self).__init__(parent) > > loader = QtUiTools.QUiLoader() > > self.ui = > > > loader.load("/home/aklaver/software_projects/greenhouse_app/python_code/plant_app_qt/forms/plant_form.ui") > > self.model = QtSql.QSqlTableModel(self, db=db) > > self.model.setTable("plant1") > > self.model.setSort(0, QtCore.Qt.AscendingOrder) > > self.model.setEditStrategy(self.model.OnManualSubmit) > > self.model.select() > > self.dm = QtGui.QDataWidgetMapper(self) > > self.dm.setSubmitPolicy(self.dm.ManualSubmit) > > self.dm.setModel(self.model) > > self.dm.addMapping(self.ui.plantNoLi, 0) > > self.dm.addMapping(self.ui.commonLi, 1) > > self.dm.addMapping(self.ui.genusLi, 2) > > self.dm.addMapping(self.ui.speciesLi, 3) > > self.dm.toFirst() > > self.saveBtn = self.ui.saveBtn > > self.saveBtn.clicked.connect(self.model.submitAll) > > self.ui.show() > > self.center() > > > > def center(self): > > qr = self.frameGeometry() > > cp = QtGui.QDesktopWidget().availableGeometry().center() > > qr.moveCenter(cp) > > self.move(qr.topLeft()) > > > > I am obviously missing something, I am just not sure what? > > I tried the above with OnFieldChange for the model and AutoSubmit for > > the DataMapper. When I opened the form the first field would update > to > > its existing value bit then I could not change anything. The changed > > value stick in the widget, they just do not get to the database. > > > > Thanks, > > > > -- > > Adrian Klaver > > adrian.klaver at gmail.com > > _______________________________________________ > > PySide mailing list > > PySide at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/pyside > > > > > > > -- > Adrian Klaver > adrian.klaver at gmail.com > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vasure at gmail.com Sun Feb 17 16:03:58 2013 From: vasure at gmail.com (Srini Kommoori) Date: Sun, 17 Feb 2013 07:03:58 -0800 Subject: [PySide] Shiboken build failed In-Reply-To: <20130216061214.GA11544@wireplant.com> References: <20130216061214.GA11544@wireplant.com> Message-ID: Error is from QtCore/qatomic_armv5.h - implies coming off of main Qt package. Were you able to build standalone Qt? On Fri, Feb 15, 2013 at 10:12 PM, david wrote: > I'm attempting to cross compile PySide for a mini6410 ARM11 SBC, but I'm > running into an error compiling Shiboken. > > cmake output: > > david at devbox:~/Downloads/shiboken-1.1.2$ cmake . > -- The C compiler identification is GNU > -- The CXX compiler identification is GNU > -- Check for working C compiler: /usr/bin/gcc > -- Check for working C compiler: /usr/bin/gcc -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Check for working CXX compiler: /usr/bin/c++ > -- Check for working CXX compiler: /usr/bin/c++ -- 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 Qt-Version 4.8.4 (using /usr/local/bin/qmake) > -- Found PythonLibs: /usr/lib/libpython2.6.so > -- Found LibXml2: /usr/lib/libxml2.so > -- checking for module 'libxslt' > -- found libxslt, version 1.1.26 > -- Found LibXslt: /usr/lib/libxslt.so > -- sphinx-build - not found! doc target disabled > -- Tests will be generated using the protected hack! > -- Found PythonInterp: /usr/bin/python2.6 > -- Configuring done > -- Generating done > -- Build files have been written to: /home/david/Downloads/shiboken-1.1.2 > > make output: > david at devbox:~/Downloads/shiboken-1.1.2$ make > CROSS_COMPILE=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi- > [ 1%] Generating qrc_generator.cxx > [ 1%] Building CXX object > ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o > In file included from /usr/local/include/QtCore/qatomic_arm.h:70, > from /usr/local/include/QtCore/qatomic_arch.h:56, > from /usr/local/include/QtCore/qbasicatomic.h:227, > from /usr/local/include/QtCore/qatomic.h:46, > from /usr/local/include/QtCore/qhash.h:45, > from /usr/local/include/QtCore/QHash:1, > from > /home/david/Downloads/shiboken-1.1.2/ApiExtractor/typesystem.h:27, > from > /home/david/Downloads/shiboken-1.1.2/ApiExtractor/abstractmetalang.h:27, > from > /home/david/Downloads/shiboken-1.1.2/ApiExtractor/apiextractor.h:28, > from > /home/david/Downloads/shiboken-1.1.2/ApiExtractor/apiextractor.cpp:24: > /usr/local/include/QtCore/qatomic_armv5.h: In member function .int > QBasicAtomicInt::fetchAndStoreOrdered(int).: > /usr/local/include/QtCore/qatomic_armv5.h:236: error: .count. was not > declared in this scope > /usr/local/include/QtCore/qatomic_armv5.h: In member function .T* > QBasicAtomicPointer::fetchAndStoreOrdered(T*).: > /usr/local/include/QtCore/qatomic_armv5.h:373: error: .count. was not > declared in this scope > make[2]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o] > Error 1 > make[1]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/all] Error 2 > make: *** [all] Error 2 > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vasure at gmail.com Sun Feb 17 16:17:27 2013 From: vasure at gmail.com (Srini Kommoori) Date: Sun, 17 Feb 2013 07:17:27 -0800 Subject: [PySide] DataMapper issues In-Reply-To: References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> Message-ID: I tried to create a simple testcase to recreate the problem - so far basic stuff works for me(mapper and sql components). If you have a simple test case, it would help a lot. BTW, there is a simple example under pyside examples http://qt.gitorious.org/pyside/pyside-examples/blobs/master/examples/sql/tablemodel.py that I started with. On Sun, Feb 17, 2013 at 6:22 AM, anatoly techtonik wrote: > Hi Adrian, > > The detection of root cause of this bug is impossible using method of > static analysis of your snippet. You need to strip it to the bare bones > example that can be executed on the systems other that OpenSuse 12.2 to > confirm the bug is not affected by operating system configuration / > combination of versions of DB and binding packages. > > It will help to maintain an instruction on PySide wiki how to create such > testing environment so that the operation can be followed and automated for > future use. As you're the most interested person in what. > > Mind you that writing this 'fixture creating guide' and clearing place for > it does not guarantee that your particular problem is easy enough (or > feasible) to by tracked and solved. But it may increase the chances up to > 80% depending on the complexity, and will lower the barrier for PySide > contributors, who are not yet (but may be) able to solve your problem. > > > -- > anatoly t. > > > On Sun, Feb 17, 2013 at 6:05 AM, Adrian Klaver wrote: > >> On 02/16/2013 07:01 PM, Srini Kommoori wrote: >> > Can you set/get the sql db using python? >> > >> > As you are on Python, I would use sqlalchemy or native python bindings >> > for the sql interface and test it out. >> >> The database connection works. I get the correct values in the lineEdit >> widgets. As I mentioned when I set up OnFieldChange and AutoSubmit the >> form would update the first field on entry. >> > >> > >> > >> > On Sat, Feb 16, 2013 at 3:19 PM, Adrian Klaver > > > wrote: >> > >> > OpenSuse 12.2 >> > pyside 1.1.2-1.11 >> > Python 2.7.3 >> > >> > I have the following and it will not save the data to the database: >> > >> > class PlantForm(QtGui.QMainWindow): >> > def __init__(self, parent=None): >> > super(PlantForm, self).__init__(parent) >> > loader = QtUiTools.QUiLoader() >> > self.ui = >> > >> loader.load("/home/aklaver/software_projects/greenhouse_app/python_code/plant_app_qt/forms/plant_form.ui") >> > self.model = QtSql.QSqlTableModel(self, db=db) >> > self.model.setTable("plant1") >> > self.model.setSort(0, QtCore.Qt.AscendingOrder) >> > self.model.setEditStrategy(self.model.OnManualSubmit) >> > self.model.select() >> > self.dm = QtGui.QDataWidgetMapper(self) >> > self.dm.setSubmitPolicy(self.dm.ManualSubmit) >> > self.dm.setModel(self.model) >> > self.dm.addMapping(self.ui.plantNoLi, 0) >> > self.dm.addMapping(self.ui.commonLi, 1) >> > self.dm.addMapping(self.ui.genusLi, 2) >> > self.dm.addMapping(self.ui.speciesLi, 3) >> > self.dm.toFirst() >> > self.saveBtn = self.ui.saveBtn >> > self.saveBtn.clicked.connect(self.model.submitAll) >> > self.ui.show() >> > self.center() >> > >> > def center(self): >> > qr = self.frameGeometry() >> > cp = QtGui.QDesktopWidget().availableGeometry().center() >> > qr.moveCenter(cp) >> > self.move(qr.topLeft()) >> > >> > I am obviously missing something, I am just not sure what? >> > I tried the above with OnFieldChange for the model and AutoSubmit >> for >> > the DataMapper. When I opened the form the first field would update >> to >> > its existing value bit then I could not change anything. The changed >> > value stick in the widget, they just do not get to the database. >> > >> > Thanks, >> > >> > -- >> > Adrian Klaver >> > adrian.klaver at gmail.com >> > _______________________________________________ >> > PySide mailing list >> > PySide at qt-project.org >> > http://lists.qt-project.org/mailman/listinfo/pyside >> > >> > >> >> >> -- >> Adrian Klaver >> adrian.klaver at gmail.com >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.klaver at gmail.com Sun Feb 17 16:28:24 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sun, 17 Feb 2013 07:28:24 -0800 Subject: [PySide] DataMapper issues In-Reply-To: References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> Message-ID: <5120F718.3060205@gmail.com> On 02/17/2013 07:17 AM, Srini Kommoori wrote: > I tried to create a simple testcase to recreate the problem - so far > basic stuff works for me(mapper and sql components). If you have a > simple test case, it would help a lot. > > BTW, there is a simple example under pyside examples > http://qt.gitorious.org/pyside/pyside-examples/blobs/master/examples/sql/tablemodel.py that > I started with. > Do you have that code available? I mean the example with your extensions, then I can test it here to verify the issue is with my setup or me. -- Adrian Klaver adrian.klaver at gmail.com From adrian.klaver at gmail.com Sun Feb 17 23:14:20 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sun, 17 Feb 2013 14:14:20 -0800 Subject: [PySide] DataMapper issues In-Reply-To: References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> Message-ID: <5121563C.1060905@gmail.com> On 02/17/2013 07:17 AM, Srini Kommoori wrote: > I tried to create a simple testcase to recreate the problem - so far > basic stuff works for me(mapper and sql components). If you have a > simple test case, it would help a lot. > > It turns out it is an interaction between the model EditStrategy and the DataMapper SubmitPolicy. You cannot set a model EditStrategy. If you leave it unset then the DataMapper works. Though for a reason I have not yet figured out when you do DataMapper.submit() all the mapped fields are updated to the database, not just the changed one(s). -- Adrian Klaver adrian.klaver at gmail.com From vasure at gmail.com Mon Feb 18 00:43:15 2013 From: vasure at gmail.com (Srini Kommoori) Date: Sun, 17 Feb 2013 15:43:15 -0800 Subject: [PySide] DataMapper issues In-Reply-To: <5121563C.1060905@gmail.com> References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> <5121563C.1060905@gmail.com> Message-ID: Don't have access to the computer but it was very few modifications to the linked code. Hope you are way past the issue you were debugging. On Feb 17, 2013 2:14 PM, "Adrian Klaver" wrote: > On 02/17/2013 07:17 AM, Srini Kommoori wrote: > >> I tried to create a simple testcase to recreate the problem - so far >> basic stuff works for me(mapper and sql components). If you have a >> simple test case, it would help a lot. >> >> >> > It turns out it is an interaction between the model EditStrategy and the > DataMapper SubmitPolicy. You cannot set a model EditStrategy. If you leave > it unset then the DataMapper works. Though for a reason I have not yet > figured out when you do DataMapper.submit() all the mapped fields are > updated to the database, not just the changed one(s). > > > > -- > Adrian Klaver > adrian.klaver at gmail.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.klaver at gmail.com Mon Feb 18 01:40:38 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sun, 17 Feb 2013 16:40:38 -0800 Subject: [PySide] DataMapper issues In-Reply-To: References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> <5121563C.1060905@gmail.com> Message-ID: <51217886.7090007@gmail.com> On 02/17/2013 03:43 PM, Srini Kommoori wrote: > Don't have access to the computer but it was very few modifications to > the linked code. > > Hope you are way past the issue you were debugging. > Thanks, actually I have decided to back up a bit. Working some simple code to understand how Qt(PySide) operates at a basic level. It is still a bit of a mystery to me how QApplication picks up the widgets that are created after app = QtGui.QApplication(sys.argv) -- Adrian Klaver adrian.klaver at gmail.com From vasure at gmail.com Mon Feb 18 04:28:18 2013 From: vasure at gmail.com (Srini Kommoori) Date: Sun, 17 Feb 2013 19:28:18 -0800 Subject: [PySide] DataMapper issues In-Reply-To: <51217886.7090007@gmail.com> References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> <5121563C.1060905@gmail.com> <51217886.7090007@gmail.com> Message-ID: For any Qt App, QtGui.QApplication is a main event loop. Every gui app needs one QtGui.QApplication. There could be muliple View/UI elements depending on developers wish. 1. QWidget/QMainWindow 2. QWebkit 3. QGraphicsView 4. QDeclarativeView You can keep changing the views depending on the app requirements. Hope that helps. -Srini On Sun, Feb 17, 2013 at 4:40 PM, Adrian Klaver wrote: > On 02/17/2013 03:43 PM, Srini Kommoori wrote: > >> Don't have access to the computer but it was very few modifications to >> the linked code. >> >> Hope you are way past the issue you were debugging. >> >> > Thanks, actually I have decided to back up a bit. Working some simple code > to understand how Qt(PySide) operates at a basic level. It is still a bit > of a mystery to me how QApplication picks up the widgets that are created > after app = QtGui.QApplication(sys.argv) > > > -- > Adrian Klaver > adrian.klaver at gmail.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.klaver at gmail.com Mon Feb 18 04:55:37 2013 From: adrian.klaver at gmail.com (Adrian Klaver) Date: Sun, 17 Feb 2013 19:55:37 -0800 Subject: [PySide] DataMapper issues In-Reply-To: References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> <5121563C.1060905@gmail.com> <51217886.7090007@gmail.com> Message-ID: <5121A639.7060403@gmail.com> On 02/17/2013 07:28 PM, Srini Kommoori wrote: > For any Qt App, QtGui.QApplication is a main event loop. Every gui app > needs one QtGui.QApplication. > > There could be muliple View/UI elements depending on developers wish. > 1. QWidget/QMainWindow > 2. QWebkit > 3. QGraphicsView > 4. QDeclarativeView > > You can keep changing the views depending on the app requirements. > > Hope that helps. Yes, but what I do not understand is in the following sequence; if __name__ == '__main__': import sys app = QtGui.QApplication(sys.argv) if not connection.createConnection(): sys.exit(1) model = QtSql.QSqlTableModel() initializeModel(model) view1 = createView("Table Model (View 1)", model) view2 = createView("Table Model (View 2)", model) view1.show() view2.move(view1.x() + view1.width() + 20, view1.y()) view2.show() sys.exit(app.exec_()) Once app is instantiated how are view1 and view2 hooked into it without there being an explicit link? > > -Srini > -- Adrian Klaver adrian.klaver at gmail.com From vasure at gmail.com Mon Feb 18 16:30:51 2013 From: vasure at gmail.com (Srini Kommoori) Date: Mon, 18 Feb 2013 07:30:51 -0800 Subject: [PySide] DataMapper issues In-Reply-To: <5121A639.7060403@gmail.com> References: <512013EA.7050501@gmail.com> <512048FA.8060402@gmail.com> <5121563C.1060905@gmail.com> <51217886.7090007@gmail.com> <5121A639.7060403@gmail.com> Message-ID: Try this documentation to understand the event loop. If you are familiar with other gui frameworks, they have something similar. For eg: objective c - NSApplication. Gtk - gtk_init http://qt-project.org/doc/qt-5.0/qtwidgets/qapplication.html and http://qt-project.org/doc/qt-5.0/qtcore/qcoreapplication.html On Sun, Feb 17, 2013 at 7:55 PM, Adrian Klaver wrote: > On 02/17/2013 07:28 PM, Srini Kommoori wrote: > >> For any Qt App, QtGui.QApplication is a main event loop. Every gui app >> needs one QtGui.QApplication. >> >> There could be muliple View/UI elements depending on developers wish. >> 1. QWidget/QMainWindow >> 2. QWebkit >> 3. QGraphicsView >> 4. QDeclarativeView >> >> You can keep changing the views depending on the app requirements. >> >> Hope that helps. >> > > Yes, but what I do not understand is in the following sequence; > > if __name__ == '__main__': > > import sys > > app = QtGui.QApplication(sys.argv) > if not connection.createConnection(): > sys.exit(1) > > model = QtSql.QSqlTableModel() > > initializeModel(model) > > view1 = createView("Table Model (View 1)", model) > view2 = createView("Table Model (View 2)", model) > > view1.show() > view2.move(view1.x() + view1.width() + 20, view1.y()) > view2.show() > > sys.exit(app.exec_()) > > > Once app is instantiated how are view1 and view2 hooked into it without > there being an explicit link? > > >> -Srini >> >> > -- > Adrian Klaver > adrian.klaver at gmail.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.kolman at gmail.com Mon Feb 18 17:02:36 2013 From: martin.kolman at gmail.com (Martin Kolman) Date: Mon, 18 Feb 2013 17:02:36 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide Message-ID: <5122509C.9060709@gmail.com> Hi, I would like announce that I've managed to build Shiboken & PySide against the latest Necessitas Qt libraries for Android. I've also found found a way to bundle all the necessary libraries to single standalone Android APK package. This basically means, that it is now possible to write Python & PySide applications that can be installed from standalone APK packages to non-rooted user devices, just like any other Android application. While I haven't tried that yet, it should be also possible to submit them to Google Play and other online Android application stores/repositories. Build & usage guide I've written this comprehensive Pyside for Android guide: http://modrana.org/trac/wiki/PySideForAndroid The guide covers & contains: * building PySide for Android from source * description of how the PySide port & packaging works on Android * an example Python & PySide & Qt Components application in the form of an installable standalone APK * an example project for the Necessitas Qt Creator + instructions how to modify it to generate APKs for custom applications * links to source code * links to pre-built binaries Screenshots http://modrana.org/trac/wiki/ScreenshotsEN#PySideQtComponentsexample These screenshots show the example application after it is installed & started on an android device (HP Touchpad with CM9 in this case). The example application uses MeeGo Qt Components, which are also bundled together with a cut-down theme and the other libraries (Python & PySide) in the APK. Looking forward to your feedback ! :) Acknowledgement This project is building on the awesome work done previously by others. I basically "just" put the puzzle together. :) * Thomas Perl - showed that PySide for Android is possible * Ssortagem at Github - integrated & improved THPs patches for Shiboken and PySide * android-python27 - solved the APK bundling issue, created the initial Qt Creator Project & provides Android-buildable Python 2.7 * the BlackBerry-Py project - I've used their PySide build instructions as a base when making the Android build scripts * the Necessitas project - made Qt on Android possible & provides the Necessitas Qt Creator * Qt - provided the GUI toolkit :) * PySide - provided the Python-Qt bindings * Ineans Qt Components - provided the Qt Components used in the example application & project Thanks a lot, without your work, this would not be possible ! :) Kind regards Martin Kolman From hejibo at gmail.com Mon Feb 18 17:09:17 2013 From: hejibo at gmail.com (He Jibo) Date: Mon, 18 Feb 2013 10:09:17 -0600 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <5122509C.9060709@gmail.com> References: <5122509C.9060709@gmail.com> Message-ID: I am so happy for your achievement. I will try it. Thank you! Jibo --------------------------- He Jibo Assistant Professor Department of Psychology, Wichita State University website: www.hejibo.info On Mon, Feb 18, 2013 at 10:02 AM, Martin Kolman wrote: > Hi, > I would like announce that I've managed to build Shiboken & PySide > against the latest Necessitas Qt libraries for Android. > I've also found found a way to bundle all the necessary libraries to > single standalone Android APK package. > > This basically means, that it is now possible to write Python & PySide > applications that can be installed from standalone APK packages to > non-rooted user devices, just like any other Android application. > While I haven't tried that yet, it should be also possible to submit > them to Google Play and other online Android application > stores/repositories. > > > Build & usage guide > I've written this comprehensive Pyside for Android guide: > http://modrana.org/trac/wiki/PySideForAndroid > > The guide covers & contains: > * building PySide for Android from source > * description of how the PySide port & packaging works on Android > * an example Python & PySide & Qt Components application in the form of > an installable standalone APK > * an example project for the Necessitas Qt Creator + instructions how to > modify it to generate APKs for custom applications > * links to source code > * links to pre-built binaries > > > Screenshots > http://modrana.org/trac/wiki/ScreenshotsEN#PySideQtComponentsexample > These screenshots show the example application after it is installed & > started on an android device (HP Touchpad with CM9 in this case). > The example application uses MeeGo Qt Components, which are also bundled > together with a cut-down theme and the other libraries (Python & PySide) > in the APK. > > > Looking forward to your feedback ! :) > > > Acknowledgement > This project is building on the awesome work done previously by others. > I basically "just" put the puzzle together. :) > > * Thomas Perl - showed that PySide for Android is possible > * Ssortagem at Github - integrated & improved THPs patches for Shiboken and > PySide > * android-python27 - solved the APK bundling issue, created the initial > Qt Creator Project & provides Android-buildable Python 2.7 > * the BlackBerry-Py project - I've used their PySide build instructions > as a base when making the Android build scripts > * the Necessitas project - made Qt on Android possible & provides the > Necessitas Qt Creator > * Qt - provided the GUI toolkit :) > * PySide - provided the Python-Qt bindings > * Ineans Qt Components - provided the Qt Components used in the example > application & project > > Thanks a lot, without your work, this would not be possible ! :) > > Kind regards > Martin Kolman > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vasure at gmail.com Mon Feb 18 19:10:03 2013 From: vasure at gmail.com (Srini Kommoori) Date: Mon, 18 Feb 2013 10:10:03 -0800 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <5122509C.9060709@gmail.com> References: <5122509C.9060709@gmail.com> Message-ID: Martin, Looking good. On Mon, Feb 18, 2013 at 8:02 AM, Martin Kolman wrote: > Hi, > I would like announce that I've managed to build Shiboken & PySide > against the latest Necessitas Qt libraries for Android. > I've also found found a way to bundle all the necessary libraries to > single standalone Android APK package. > > This basically means, that it is now possible to write Python & PySide > applications that can be installed from standalone APK packages to > non-rooted user devices, just like any other Android application. > While I haven't tried that yet, it should be also possible to submit > them to Google Play and other online Android application > stores/repositories. > > > Build & usage guide > I've written this comprehensive Pyside for Android guide: > http://modrana.org/trac/wiki/PySideForAndroid > > The guide covers & contains: > * building PySide for Android from source > * description of how the PySide port & packaging works on Android > * an example Python & PySide & Qt Components application in the form of > an installable standalone APK > * an example project for the Necessitas Qt Creator + instructions how to > modify it to generate APKs for custom applications > * links to source code > * links to pre-built binaries > > > Screenshots > http://modrana.org/trac/wiki/ScreenshotsEN#PySideQtComponentsexample > These screenshots show the example application after it is installed & > started on an android device (HP Touchpad with CM9 in this case). > The example application uses MeeGo Qt Components, which are also bundled > together with a cut-down theme and the other libraries (Python & PySide) > in the APK. > > > Looking forward to your feedback ! :) > > > Acknowledgement > This project is building on the awesome work done previously by others. > I basically "just" put the puzzle together. :) > > * Thomas Perl - showed that PySide for Android is possible > * Ssortagem at Github - integrated & improved THPs patches for Shiboken and > PySide > * android-python27 - solved the APK bundling issue, created the initial > Qt Creator Project & provides Android-buildable Python 2.7 > * the BlackBerry-Py project - I've used their PySide build instructions > as a base when making the Android build scripts > * the Necessitas project - made Qt on Android possible & provides the > Necessitas Qt Creator > * Qt - provided the GUI toolkit :) > * PySide - provided the Python-Qt bindings > * Ineans Qt Components - provided the Qt Components used in the example > application & project > > Thanks a lot, without your work, this would not be possible ! :) > > Kind regards > Martin Kolman > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.c.visser at science-applied.nl Tue Feb 19 09:27:03 2013 From: l.c.visser at science-applied.nl (Ludo Visser) Date: Tue, 19 Feb 2013 09:27:03 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <5122509C.9060709@gmail.com> References: <5122509C.9060709@gmail.com> Message-ID: Hi Martin, This is awesome. I will give this a try soon; I've been waiting for a solution like this for Android development. Thanks! On Feb 18, 2013, at 5:02 pm, Martin Kolman wrote: > Hi, > I would like announce that I've managed to build Shiboken & PySide > against the latest Necessitas Qt libraries for Android. > I've also found found a way to bundle all the necessary libraries to > single standalone Android APK package. > > This basically means, that it is now possible to write Python & PySide > applications that can be installed from standalone APK packages to > non-rooted user devices, just like any other Android application. > While I haven't tried that yet, it should be also possible to submit > them to Google Play and other online Android application > stores/repositories. > > > Build & usage guide > I've written this comprehensive Pyside for Android guide: > http://modrana.org/trac/wiki/PySideForAndroid > > The guide covers & contains: > * building PySide for Android from source > * description of how the PySide port & packaging works on Android > * an example Python & PySide & Qt Components application in the form of > an installable standalone APK > * an example project for the Necessitas Qt Creator + instructions how to > modify it to generate APKs for custom applications > * links to source code > * links to pre-built binaries > > > Screenshots > http://modrana.org/trac/wiki/ScreenshotsEN#PySideQtComponentsexample > These screenshots show the example application after it is installed & > started on an android device (HP Touchpad with CM9 in this case). > The example application uses MeeGo Qt Components, which are also bundled > together with a cut-down theme and the other libraries (Python & PySide) > in the APK. > > > Looking forward to your feedback ! :) > > > Acknowledgement > This project is building on the awesome work done previously by others. > I basically "just" put the puzzle together. :) > > * Thomas Perl - showed that PySide for Android is possible > * Ssortagem at Github - integrated & improved THPs patches for Shiboken and > PySide > * android-python27 - solved the APK bundling issue, created the initial > Qt Creator Project & provides Android-buildable Python 2.7 > * the BlackBerry-Py project - I've used their PySide build instructions > as a base when making the Android build scripts > * the Necessitas project - made Qt on Android possible & provides the > Necessitas Qt Creator > * Qt - provided the GUI toolkit :) > * PySide - provided the Python-Qt bindings > * Ineans Qt Components - provided the Qt Components used in the example > application & project > > Thanks a lot, without your work, this would not be possible ! :) > > Kind regards > Martin Kolman > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- Ludo C. Visser, M.Sc. Science Applied phone: +31 6 1066 3076 e-mail: l.c.visser at science-applied.nl web: www.science-applied.nl From backup.rlacko at gmail.com Tue Feb 19 16:21:10 2013 From: backup.rlacko at gmail.com (Roman Lacko) Date: Tue, 19 Feb 2013 16:21:10 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <5122509C.9060709@gmail.com> References: <5122509C.9060709@gmail.com> Message-ID: Hi Martin, this is wonderful work. Do you think you could add the guide to PySide Wiki ? Thanks Roman 2013/2/18 Martin Kolman > Hi, > I would like announce that I've managed to build Shiboken & PySide > against the latest Necessitas Qt libraries for Android. > I've also found found a way to bundle all the necessary libraries to > single standalone Android APK package. > > This basically means, that it is now possible to write Python & PySide > applications that can be installed from standalone APK packages to > non-rooted user devices, just like any other Android application. > While I haven't tried that yet, it should be also possible to submit > them to Google Play and other online Android application > stores/repositories. > > > Build & usage guide > I've written this comprehensive Pyside for Android guide: > http://modrana.org/trac/wiki/PySideForAndroid > > The guide covers & contains: > * building PySide for Android from source > * description of how the PySide port & packaging works on Android > * an example Python & PySide & Qt Components application in the form of > an installable standalone APK > * an example project for the Necessitas Qt Creator + instructions how to > modify it to generate APKs for custom applications > * links to source code > * links to pre-built binaries > > > Screenshots > http://modrana.org/trac/wiki/ScreenshotsEN#PySideQtComponentsexample > These screenshots show the example application after it is installed & > started on an android device (HP Touchpad with CM9 in this case). > The example application uses MeeGo Qt Components, which are also bundled > together with a cut-down theme and the other libraries (Python & PySide) > in the APK. > > > Looking forward to your feedback ! :) > > > Acknowledgement > This project is building on the awesome work done previously by others. > I basically "just" put the puzzle together. :) > > * Thomas Perl - showed that PySide for Android is possible > * Ssortagem at Github - integrated & improved THPs patches for Shiboken and > PySide > * android-python27 - solved the APK bundling issue, created the initial > Qt Creator Project & provides Android-buildable Python 2.7 > * the BlackBerry-Py project - I've used their PySide build instructions > as a base when making the Android build scripts > * the Necessitas project - made Qt on Android possible & provides the > Necessitas Qt Creator > * Qt - provided the GUI toolkit :) > * PySide - provided the Python-Qt bindings > * Ineans Qt Components - provided the Qt Components used in the example > application & project > > Thanks a lot, without your work, this would not be possible ! :) > > Kind regards > Martin Kolman > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ssorgatem at gmail.com Tue Feb 19 18:39:02 2013 From: ssorgatem at gmail.com (=?UTF-8?Q?Adri=C3=A0_Cereto_Massagu=C3=A9?=) Date: Tue, 19 Feb 2013 18:39:02 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: References: <5122509C.9060709@gmail.com> Message-ID: Hi Martin, That's great news :) Hopefully it will help PySide's popularity. BTW, I'm that mysterious "Ssorgatem at GitHub" ;) so you can use my real name instead in the acknowledgements (Adrià Cereto-Massagué). Now kivy's got real competition. Kind regards, Adrià 2013/2/18 Martin Kolman > >> Hi, >> I would like announce that I've managed to build Shiboken & PySide >> against the latest Necessitas Qt libraries for Android. >> I've also found found a way to bundle all the necessary libraries to >> single standalone Android APK package. >> >> This basically means, that it is now possible to write Python & PySide >> applications that can be installed from standalone APK packages to >> non-rooted user devices, just like any other Android application. >> While I haven't tried that yet, it should be also possible to submit >> them to Google Play and other online Android application >> stores/repositories. >> >> >> Build & usage guide >> I've written this comprehensive Pyside for Android guide: >> http://modrana.org/trac/wiki/PySideForAndroid >> >> The guide covers & contains: >> * building PySide for Android from source >> * description of how the PySide port & packaging works on Android >> * an example Python & PySide & Qt Components application in the form of >> an installable standalone APK >> * an example project for the Necessitas Qt Creator + instructions how to >> modify it to generate APKs for custom applications >> * links to source code >> * links to pre-built binaries >> >> >> Screenshots >> http://modrana.org/trac/wiki/ScreenshotsEN#PySideQtComponentsexample >> These screenshots show the example application after it is installed & >> started on an android device (HP Touchpad with CM9 in this case). >> The example application uses MeeGo Qt Components, which are also bundled >> together with a cut-down theme and the other libraries (Python & PySide) >> in the APK. >> >> >> Looking forward to your feedback ! :) >> >> >> Acknowledgement >> This project is building on the awesome work done previously by others. >> I basically "just" put the puzzle together. :) >> >> * Thomas Perl - showed that PySide for Android is possible >> * Ssortagem at Github - integrated & improved THPs patches for Shiboken and >> PySide >> * android-python27 - solved the APK bundling issue, created the initial >> Qt Creator Project & provides Android-buildable Python 2.7 >> * the BlackBerry-Py project - I've used their PySide build instructions >> as a base when making the Android build scripts >> * the Necessitas project - made Qt on Android possible & provides the >> Necessitas Qt Creator >> * Qt - provided the GUI toolkit :) >> * PySide - provided the Python-Qt bindings >> * Ineans Qt Components - provided the Qt Components used in the example >> application & project >> >> Thanks a lot, without your work, this would not be possible ! :) >> >> Kind regards >> Martin Kolman >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -- *Adrià Cereto Massagué* Ph.D Student Nutrigenomics Research Group Biochemistry and Biotechnology Department Building N4, Campus Sescelades Universitat Rovira i Virgili Tarragona, Catalonia Languages: Català, Español, English, Français, Deutsch, Português Important Notice -------------- next part -------------- An HTML attachment was scrubbed... URL: From superslimme at netscape.net Wed Feb 20 21:07:51 2013 From: superslimme at netscape.net (robbert) Date: Wed, 20 Feb 2013 21:07:51 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <5122509C.9060709@gmail.com> References: <5122509C.9060709@gmail.com> Message-ID: <51252D17.4010105@netscape.net> > This basically means, that it is now possible to write Python & PySide > applications that can be installed from standalone APK packages to > non-rooted user devices, just like any other Android application. Great work! This is what I've been waiting for, for a long time. I followed your guide for creating a package (not building PySide). I tried this on two machines, both are able to 'build' a package, and deploy it to the device. Sadly, both packages give the error: "Unfortunately, PySideExample has stopped". (Your precompiled package works nicely) The following remarks / bottlenecks I came across when using the guide. (Note, both machines run WinXp sp3) The installer of Necessitas stopped downloading at a random package, and wouldn't recover (I tried several times). The solution is to install a lot less, and use the maintenance tool to install the other packages (one by one if necessary). It could be that the shortcuts to the maintenance tool do not work. To solve this,go to the Necessitas-folder, and remove the '.new' extension from the files: "SDKMaintenanceTool.exe.new" and "SDKMaintenanceTool.dat.new". To install the ADB device driver for your device you can install PdaNet ([1], alternatives [2]) A Java JDK is necessary (download: [3]), and you need to set the environment variable JAVA_HOME (to something like: C:\Program Files\Java\jdk1.7.0_13) [4]. One machine (PC1), gave an extra error > "P:/Program Files/Git/bin/sh.exe": install: command not found > ma-make: [install_target] Error 127 (ignored) > ma-make: Leaving directory > `D:/temp/android-pyside-example-project-master/PySideExample-build-eda69e-Release' > p:\necessitas\android-ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-strip.exe: > 'D:tempandroid-pyside-example-project-masterandroid-pyside-example-project-masterandroidlibsarmeabilibPySideExample.so': > No such file According to [5] this is caused by any sh.exe on the Windows system path. Remove the git reference from the path results in another error (Not seen on PC2). > The process "P:\necessitas\QtCreator\bin\ma-make.exe" exited normally. > > Cannot find ''. > > Please make sure your application is built successfully and is > selected in Application tab ('Run option'). > It somehow also makes more configuration options available (armv5-Run locally, armv7a, arm7a-Run locally, armv5-MinGW (x86 32bit)). Some other remarks: When I loaded the example-project, it asked me to configure it. Is this correct? The guide mentions a "green deploy button", I only see the 2 run icons, and the android logo button. To deploy I used file menu (Build -> Deploy Project "PySideExample"). Kind regards, Robbert [1] http://www.junefabrics.com/android/download.php [2] http://theunlockr.com/2009/10/06/how-to-set-up-adb-usb-drivers-for-android-devices/ [3] http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html [4] http://stackoverflow.com/questions/5730815/unable-to-locate-tools-jar/10519763#10519763 [5] http://community.kde.org/Necessitas/InstallSDK#Common_problems_and_issues_.28Windows.29 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.richi at bluewin.ch Wed Feb 20 22:46:21 2013 From: a.richi at bluewin.ch (Aaron Richiger) Date: Wed, 20 Feb 2013 22:46:21 +0100 Subject: [PySide] PySide evaluation In-Reply-To: References: <50F42A29.5070106@wingware.com> <50F44B86.2030307@wingware.com> <50F47737.6040000@bluewin.ch> <50F5910D.6080607@bluewin.ch> <50F98D76.4020902@bluewin.ch> Message-ID: <5125442D.30709@bluewin.ch> Dear PySiders! Many thanks to 82 persons having filled in the PySide evaluation. This is quite an impressive number, so the results are quite representative and there are at least 82 PySide users out there, this is definitively more than "dead":-)! I finally prepared the results for publishing: Summary (graphical): https://docs.google.com/spreadsheet/viewanalytics?formkey=dHVNa1d3dVpvdFdJV1U3THBxVVk2Tnc6MQ#gid=0 Spreadsheet (raw data): https://docs.google.com/spreadsheet/pub?key=0AiCKNmK0ugiLdHVNa1d3dVpvdFdJV1U3THBxVVk2Tnc&output=html As you can see, I deleted your names and email addresses to protect your data. I still have the original with the names, so if you really want to contact somebody, you may ask me (via private email address) for the name and I will then contact the requested person to ask whether it is okay for him/her that I pass his email address to someone else. Some interesting facts from the results of the evaluation to start the discussion: - PySide is mostly used for projects at work by companies - Intel/ Arm and Linux/ Mac OS X/Windows are the most important architectures/ operating systems - PySide for mobile devices (Android/ Ubuntu phone) are really wanted - PySide is mostly used for non-game GUI programming because of it's license - Qt5 support is wanted by almost everybody - We are willed to donate 10850 dollars in case of a good roadmap (I took the middle of your selected ranges to estimate this: 0, 50, 500 and 1000 dollars) - 26 developers would like to improve PySide with a total of 16 person-days per week! - If we can pay them, they could invest 22 person-days per week! - A huge majority wants to use Python instead of C++ if they improve PySide, BUT: some expert users really recommend to stick with the working tool with such a small community instead of introducing new things in Python (never change a winning horse:-)) I hope, the results help us to get a better understanding of the users and to create a good roadmap for the future. Feel free to discuss the results and to publish the two links above (somebody wanted the results to be available on the PySide website, so if anybody could insert the links there, this would be great). Looking forward to improve Pyside, Aaron From sdeibel at wingware.com Wed Feb 20 23:43:55 2013 From: sdeibel at wingware.com (Stephan Deibel) Date: Wed, 20 Feb 2013 17:43:55 -0500 Subject: [PySide] PySide evaluation In-Reply-To: <5125442D.30709@bluewin.ch> References: <50F42A29.5070106@wingware.com> <50F44B86.2030307@wingware.com> <50F47737.6040000@bluewin.ch> <50F5910D.6080607@bluewin.ch> <50F98D76.4020902@bluewin.ch> <5125442D.30709@bluewin.ch> Message-ID: <512551AB.7010700@wingware.com> Aaron Richiger wrote: > Many thanks to 82 persons having filled in the PySide evaluation. This > is quite an impressive number, so the results are quite representative > and there are at least 82 PySide users out there, this is definitively > more than "dead":-)! Thanks very much for doing this! For what it's worth: Wingware would certainly consider paying for development work that solves the specific problems that we have with PySide, rather than doing it ourselves. I think we'ld focus on bug fixes but it could go beyond that over time, depending on how things go. Hopefully this is also true of the other people that checked "over $1K" on the survey. - Stephan From vladovi at atlas.cz Thu Feb 21 08:42:13 2013 From: vladovi at atlas.cz (=?utf-8?q?Vl=C3=A1=C4=8Fa?=) Date: Thu, 21 Feb 2013 08:42:13 +0100 Subject: [PySide] GSoC Message-ID: <20130221084213.3DDBF8ED@atlas.cz> Hi,   I'm wondering if there are any plans to join Google Summer of Code this year. For me the most important issue regarding PySide is missing Qt 5 support. I need Qt 5 because of Qt Quick 2 and Qt Mobility.   Also I think that another good project would to investigate how to use PySide to program for Ubuntu tablet and phone. AFAIK currently Qt with C++ is suggested for phones and PyGTK for tablets. If PySide can be used for all platforms (mobile, tablet, desktop) it would be great.   Maybe some people would be able to work on these tasks during GSoC. What do you think?   Best regards, Vladimir From sable at users.sourceforge.net Thu Feb 21 12:15:21 2013 From: sable at users.sourceforge.net (=?ISO-8859-1?Q?S=E9bastien_Sabl=E9?=) Date: Thu, 21 Feb 2013 12:15:21 +0100 Subject: [PySide] PySide evaluation In-Reply-To: <5125442D.30709@bluewin.ch> References: <50F42A29.5070106@wingware.com> <50F44B86.2030307@wingware.com> <50F47737.6040000@bluewin.ch> <50F5910D.6080607@bluewin.ch> <50F98D76.4020902@bluewin.ch> <5125442D.30709@bluewin.ch> Message-ID: Hi, many thanks Aaron for collecting and reporting those statistics; that is very interesting indeed! Best regards Sébastien -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmohler at gamry.com Thu Feb 21 15:11:23 2013 From: jmohler at gamry.com (Joel B. Mohler) Date: Thu, 21 Feb 2013 09:11:23 -0500 Subject: [PySide] RuntimeError: Failed to connect signal xxxx Message-ID: <51262B0B.1030409@gamry.com> Does anyone recognize and know a solution for the "Failed to connect signal" traceback here? I get this runtime error occasionally. Invalid Signal signature: toggled(bool) Traceback (most recent call last): .... stuff ... RuntimeError: Failed to connect signal toggled(bool). I don't have any case that is small enough or public enough to post here in any detail, but I'm sure I'm not the only one who recognizes this on sight as the dreaded erratic failure-to-connect bug. I have two different apps which exhibit the issue (different signals). The question at http://stackoverflow.com/questions/8881048/getting-erratic-invalid-signal-signature-errors-in-pyside-qwebpage seems to me to be just as bizarre and surely related to my own conundrums. Despite all my reluctance to post code, I do have to admit that it is clear to me that certain signals have it happen and some never do. That is, I have never seen this error occur for the vast majority of signals I connect, but there are just a few that it happens on maybe 1 in 20 times. Any thoughts on this? Thanks, Joel From martin.kolman at gmail.com Thu Feb 21 16:05:48 2013 From: martin.kolman at gmail.com (Martin Kolman) Date: Thu, 21 Feb 2013 16:05:48 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: References: <5122509C.9060709@gmail.com> Message-ID: <512637CC.8080409@gmail.com> 19.2.2013 18:39, Adrià Cereto Massagué: > Hi Martin, > > That's great news :) Hopefully it will help PySide's popularity. I definitely hope so - after the death of Linux at Nokia, it wasn't lookig particularly good with Python on mobile devices. Android being the most used mobile OS should give it a good boost. :) BTW, regarding recent PySide developments in the mobile area: * Mer & Nemo Mobile: PySide is available [1] and already used by multiple applications - as Mer & Nemo are the base Jollas Sailfish mobile OS is being build upon, there are good chances PySide will be available for Sailfish out of the box * Ubuntu Phone/Tablet - build on Qt5, but if they either also ship Qt 4 or PySide gets Qt 5 support, getting pyside to work on this OS/distro PySide should be probably easy * BlackBerry 10 - before finishing the PySide I've managed to make PySide work on BB10 (building on the work of the BlackBerry-Py project for the BB Playbook tablet) - there is not much documentation to for this yet, but I've summarized the most important gotchas in this [2] mailing list message - my PySide & Qt Components application for BB10 called Mieru is already published in BlackBerry World [3] - as BB10 already contains usable Qt libries (4.8.4) and Python (3.2), the packages are quite a bit smaller than on Android - about 6.9 MB for the above mentioned application > BTW, I'm that mysterious "Ssorgatem at GitHub" ;) so you can use my real > name instead in the acknowledgements (Adrià Cereto-Massagué). OK, fixed, thanks ! :) > Now kivy's got real competition. I've investigated Kivi when looking for a cross-platform mobile-friendly GUI toolkit some time ago, but it seemed to be too low-level. > > Kind regards, > > Adrià > Best wishes Martin [1] https://build.merproject.org/package/show?package=python-pyside&project=nemo%3Adevel%3Amw [2] http://appworld.blackberry.com/webstore/content/21903916/ [3] http://www.engcorp.com/pipermail/blackberry-python/2013/000023.html From sdeibel at wingware.com Thu Feb 21 18:01:35 2013 From: sdeibel at wingware.com (Stephan Deibel) Date: Thu, 21 Feb 2013 12:01:35 -0500 Subject: [PySide] GSoC In-Reply-To: <20130221084213.3DDBF8ED@atlas.cz> References: <20130221084213.3DDBF8ED@atlas.cz> Message-ID: <512652EF.2040003@wingware.com> Vláďa wrote: > I'm wondering if there are any plans to join Google Summer of Code this year. For me the most important issue regarding PySide is missing Qt 5 support. I need Qt 5 because of Qt Quick 2 and Qt Mobility. > > Also I think that another good project would to investigate how to use PySide to program for Ubuntu tablet and phone. AFAIK currently Qt with C++ is suggested for phones and PyGTK for tablets. If PySide can be used for all platforms (mobile, tablet, desktop) it would be great. > > Maybe some people would be able to work on these tasks during GSoC. What do you think? I think it does require having one or more mentors that work with the students. Also, I remember some Python related open source projects working through the PSF to participate in GSoC, probably because of requirements of there being some sort of legal entity. If it turns out there are mentors and this is needed, I could ask contacts I have at the PSF about it. I'm a member there and have been active on the board in the past. - Stephan From pyside at m.allo.ws Thu Feb 21 18:52:13 2013 From: pyside at m.allo.ws (Zak) Date: Thu, 21 Feb 2013 12:52:13 -0500 Subject: [PySide] RuntimeError: Failed to connect signal xxxx In-Reply-To: <51262B0B.1030409@gamry.com> References: <51262B0B.1030409@gamry.com> Message-ID: <51265ECD.9000406@m.allo.ws> The following idea helped me with a different glitch that was probably unrelated to yours, but who knows, it might help you. Try each of the following: # Signals and slots example # From qt_webview_play.py @Slot(bool) # bool is PySide.QtCore.bool def my_slot(input_bool): pass # The following three lines should be equivalent, but they # are not always equivalent in practice: q_widget.connect(q_widget, SIGNAL("toggled(bool)"), my_slot) q_widget.toggled.connect(my_slot) q_widget.toggled[bool].connect(my_slot) I don't know why they are different, but sometimes they are. My bug arose when I tried to manually disconnect and reconnect signals, specifically the loadFinished(bool) signal on a QWebView widget. In my own experience, it is best to always use the first method, with SIGNAL("toggled(bool)"). I notice that the StackOverflow question you linked uses the third method. Try switching it up and see if anything helps. Good luck, Zak Fallows On 2/21/13 9:11 AM, Joel B. Mohler wrote: > Does anyone recognize and know a solution for the "Failed to connect > signal" traceback here? I get this runtime error occasionally. > > Invalid Signal signature: toggled(bool) > Traceback (most recent call last): > .... stuff ... > RuntimeError: Failed to connect signal toggled(bool). > > I don't have any case that is small enough or public enough to post here > in any detail, but I'm sure I'm not the only one who recognizes this on > sight as the dreaded erratic failure-to-connect bug. I have two > different apps which exhibit the issue (different signals). The > question at > http://stackoverflow.com/questions/8881048/getting-erratic-invalid-signal-signature-errors-in-pyside-qwebpage > seems to me to be just as bizarre and surely related to my own conundrums. > > Despite all my reluctance to post code, I do have to admit that it is > clear to me that certain signals have it happen and some never do. That > is, I have never seen this error occur for the vast majority of signals > I connect, but there are just a few that it happens on maybe 1 in 20 times. > > Any thoughts on this? > > Thanks, > Joel > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmohler at gamry.com Thu Feb 21 22:22:42 2013 From: jmohler at gamry.com (Joel B. Mohler) Date: Thu, 21 Feb 2013 16:22:42 -0500 Subject: [PySide] RuntimeError: Failed to connect signal xxxx In-Reply-To: <51265ECD.9000406@m.allo.ws> References: <51262B0B.1030409@gamry.com> <51265ECD.9000406@m.allo.ws> Message-ID: <51269022.3090607@gamry.com> On 2/21/2013 12:52 PM, Zak wrote: > The following idea helped me with a different glitch that was probably > unrelated to yours, but who knows, it might help you. Try each of the > following: > > # Signals and slots example > # From qt_webview_play.py > > @Slot(bool) # bool is PySide.QtCore.bool > def my_slot(input_bool): > pass > > # The following three lines should be equivalent, but they > # are not always equivalent in practice: > > q_widget.connect(q_widget, SIGNAL("toggled(bool)"), my_slot) > q_widget.toggled.connect(my_slot) > q_widget.toggled[bool].connect(my_slot) > > I don't know why they are different, but sometimes they are. My bug > arose when I tried to manually disconnect and reconnect signals, > specifically the loadFinished(bool) signal on a QWebView widget. > > In my own experience, it is best to always use the first method, with > SIGNAL("toggled(bool)"). I notice that the StackOverflow question you > linked uses the third method. Try switching it up and see if anything > helps. Thanks for your comments. I think they were helpful, but the bug reproduction process here got pretty weird as I fiddle with this some more. I commonly use method 2 to connect signals and slots (I wasn't aware of method 3, but I think I see it's necessity at times). I changed the one connection to use method 1 and sure enough I think I don't get that failure any more. (and now just a personal tale of woe this has led me down ...) However, I now see that regardless of signal/slot issues, that if I sit here and open,close,reopen and repeat continuously I'm sure to get signal/slot failures and missing attributes and even segfault crashes sometime in the first 30 open/close iterations. Unfortunately, this widget that I'm closing and reopening has nested sub-widgets probably 4 layers deep and many many nuances. It will take a while to decode this, but it certainly looks like memory corruption. I'm not going to hazard a guess about where to point a finger at this point aside to say that pure python pyside shouldn't segfault. For the record ... I'm on win 7 32 bit; PySide 1.1.2; python 2.7.3; Qt 4.8.2. Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.kolman at gmail.com Thu Feb 21 23:38:29 2013 From: martin.kolman at gmail.com (Martin Kolman) Date: Thu, 21 Feb 2013 23:38:29 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: References: <5122509C.9060709@gmail.com> Message-ID: <5126A1E5.5090608@gmail.com> Hi Roman, 19.2.2013 16:21, Roman Lacko: > Hi Martin, > > this is wonderful work. > Do you think you could add the guide to PySide Wiki ? OK, I've added the Guide to the Qt-Project wiki here: http://qt-project.org/wiki/PySide_for_Android_guide That should get IMHO get the guide some added visibility & others can easily improve it (the modrana.org wiki is not user editable). :) > > Thanks > Roman > Best wishes Martin Kolman From joel at kiwistrawberry.us Thu Feb 21 23:45:59 2013 From: joel at kiwistrawberry.us (Joel B. Mohler) Date: Thu, 21 Feb 2013 17:45:59 -0500 Subject: [PySide] open/close QMdiArea subwindows Message-ID: <5126A3A7.2030804@kiwistrawberry.us> TL;DR; QMdiArea claims to take any QWidget in the addSubWindow method. However, in PySide, this appears to work but it will almost certainly segfault after many (or few) open/close cycles. I get a segfault in both windows and linux on the following code. After opening and closing the window created in "newkid" 4-50 times. I simply start the program and press Ctrl+F5, Ctrl+W repeatedly activating the QAction and using the platform specific close sub-window shortcut. The nondescript newkid widget appears and disappears until on some open I get a segfault. #!/usr/bin/env python from PySide import QtCore, QtGui class MainWin(QtGui.QMainWindow): def __init__(self, parent=None): super(MainWin, self).__init__(parent) self.setCentralWidget(QtGui.QMdiArea()) self.myaction = QtGui.QAction("add win", self) self.myaction.setShortcut("Ctrl+F5") self.myaction.triggered.connect(self.newkid) self.addAction(self.myaction) def newkid(self): w = QtGui.QWidget() w.setWindowTitle("hi there") w.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.centralWidget().addSubWindow(w) w.showMaximized() if __name__ == '__main__': app = QtGui.QApplication([]) w = MainWin() w.show() app.exec_() Both systems are running PySide 1.1.2 and Qt 4.8.x. Indeed, I've modified the example to make a QMdiSubWindow rather than a QWidget and I have yet to have it crash for me after pounding on the F5 & W keys as described above. I think I have a fix then for the immediate issue, but I guess this is a bug for the bug tracker as well since the qmdiarea docs imply this should work. I think I'm with-in bounds for the documentation at http://qt-project.org/doc/qt-4.8/qmdiarea.html#addSubWindow . Joel (Side-note: this is one of the other things that went wrong in my thread about "RuntimeError: Failed to connect signal" ... the bug hunt is wide open I guess and expect I'll find other issues) From backup.rlacko at gmail.com Fri Feb 22 10:39:03 2013 From: backup.rlacko at gmail.com (Roman Lacko) Date: Fri, 22 Feb 2013 10:39:03 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <5126A1E5.5090608@gmail.com> References: <5122509C.9060709@gmail.com> <5126A1E5.5090608@gmail.com> Message-ID: Hi Martin, 2013/2/21 Martin Kolman > Hi Roman, > 19.2.2013 16:21, Roman Lacko: > >> Hi Martin, >> >> this is wonderful work. >> Do you think you could add the guide to PySide Wiki ? >> > OK, I've added the Guide to the Qt-Project wiki here: > http://qt-project.org/wiki/**PySide_for_Android_guide > Thank You for doing this > That should get IMHO get the guide some added visibility & others can > easily improve it (the modrana.org wiki is not user editable). :) > >> Thanks >> Roman >> >> Best wishes > > Martin Kolman > Regards R. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean.paul.ledoux at gmail.com Fri Feb 22 22:44:51 2013 From: jean.paul.ledoux at gmail.com (Jean-Paul LeDoux) Date: Fri, 22 Feb 2013 13:44:51 -0800 Subject: [PySide] PySide evaluation In-Reply-To: References: <50F42A29.5070106@wingware.com> <50F44B86.2030307@wingware.com> <50F47737.6040000@bluewin.ch> <50F5910D.6080607@bluewin.ch> <50F98D76.4020902@bluewin.ch> <5125442D.30709@bluewin.ch> Message-ID: There are most definitely more than 82 PySide users out there. :) I'm not sure if the community is aware of this, but every major software player in the film and fx industry (Maya, Nuke, Houdini, 3DS Max, Softimage...) supports Python and Qt. Every studio that I've worked in or read about uses Python to build their pipeline, and increasingly turn to PyQT or PySide over the native interfaces to build GUIs for artists. The compositing software I use every day, Nuke, comes with PySide installed now (used to be PyQT) and ready to build integrated interfaces. So rest assured, there are a ton of technical directors out there building with PySide. PySide is still pretty new to me, but I want to say that I appreciate all the time that people have put in, whether it be bugfixing, putting up tutorials, or answering questions on here. Thanks to all of you. Cheers, Jean-Paul LeDoux Compositing Supervisor Nitrogen Studios On Thu, Feb 21, 2013 at 3:15 AM, Sébastien Sablé < sable at users.sourceforge.net> wrote: > Hi, > > many thanks Aaron for collecting and reporting those statistics; that is > very interesting indeed! > > Best regards > > Sébastien > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From schampailler at skynet.be Sat Feb 23 10:50:02 2013 From: schampailler at skynet.be (Stefan Champailler) Date: Sat, 23 Feb 2013 10:50:02 +0100 Subject: [PySide] RuntimeError: Failed to connect signal xxxx In-Reply-To: <51269022.3090607@gamry.com> References: <51262B0B.1030409@gamry.com> <51265ECD.9000406@m.allo.ws> <51269022.3090607@gamry.com> Message-ID: <512890CA.6080202@skynet.be> Hello, I have never seen that kind of issue but what I've learned the hard way is that memory leaks can cause very erratic behaviours. So, as a first step, if you didn't already do so, you should make sure there are no ownership issues in your code. If you have a large code base, I found it was easier to simply remove the code part by part until the problem disappear (and so had I a better idea of the location of the issue). I also found very instructing to reduce the code to a small piece to reproduce the bug. Doing so help to learn quite a bit about PySide (because when you reduce code to a minimum you get to know how to express some ideas in a much better way). Either way, I bet you have some work ahead... stefan On 02/21/2013 10:22 PM, Joel B. Mohler wrote: > On 2/21/2013 12:52 PM, Zak wrote: >> The following idea helped me with a different glitch that was >> probably unrelated to yours, but who knows, it might help you. Try >> each of the following: >> >> # Signals and slots example >> # From qt_webview_play.py >> >> @Slot(bool) # bool is PySide.QtCore.bool >> def my_slot(input_bool): >> pass >> >> # The following three lines should be equivalent, but they >> # are not always equivalent in practice: >> >> q_widget.connect(q_widget, SIGNAL("toggled(bool)"), my_slot) >> q_widget.toggled.connect(my_slot) >> q_widget.toggled[bool].connect(my_slot) >> >> I don't know why they are different, but sometimes they are. My bug >> arose when I tried to manually disconnect and reconnect signals, >> specifically the loadFinished(bool) signal on a QWebView widget. >> >> In my own experience, it is best to always use the first method, with >> SIGNAL("toggled(bool)"). I notice that the StackOverflow question you >> linked uses the third method. Try switching it up and see if anything >> helps. > > Thanks for your comments. I think they were helpful, but the bug > reproduction process here got pretty weird as I fiddle with this some > more. I commonly use method 2 to connect signals and slots (I wasn't > aware of method 3, but I think I see it's necessity at times). I > changed the one connection to use method 1 and sure enough I think I > don't get that failure any more. > > (and now just a personal tale of woe this has led me down ...) > However, I now see that regardless of signal/slot issues, that if I > sit here and open,close,reopen and repeat continuously I'm sure to get > signal/slot failures and missing attributes and even segfault crashes > sometime in the first 30 open/close iterations. Unfortunately, this > widget that I'm closing and reopening has nested sub-widgets probably > 4 layers deep and many many nuances. It will take a while to decode > this, but it certainly looks like memory corruption. I'm not going to > hazard a guess about where to point a finger at this point aside to > say that pure python pyside shouldn't segfault. > > For the record ... I'm on win 7 32 bit; PySide 1.1.2; python 2.7.3; Qt > 4.8.2. > > Joel > > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- Timeo Danaos et dona ferentes -------------- next part -------------- An HTML attachment was scrubbed... URL: From schampailler at skynet.be Sat Feb 23 10:55:36 2013 From: schampailler at skynet.be (Stefan Champailler) Date: Sat, 23 Feb 2013 10:55:36 +0100 Subject: [PySide] open/close QMdiArea subwindows In-Reply-To: <5126A3A7.2030804@kiwistrawberry.us> References: <5126A3A7.2030804@kiwistrawberry.us> Message-ID: <51289218.6010805@skynet.be> Well, I'm not sure but according to the Qmdiarea doc, addSubwindow does not take ownership of the window. So when the execution path leaves newkid(), w is deleted and then QMdiArea looses it as well... (but I just read the doc, didn't test) stF On 02/21/2013 11:45 PM, Joel B. Mohler wrote: > TL;DR; QMdiArea claims to take any QWidget in the addSubWindow method. > However, in PySide, this appears to work but it will almost certainly > segfault after many (or few) open/close cycles. > > I get a segfault in both windows and linux on the following code. After > opening and closing the window created in "newkid" 4-50 times. I simply > start the program and press Ctrl+F5, Ctrl+W repeatedly activating the > QAction and using the platform specific close sub-window shortcut. The > nondescript newkid widget appears and disappears until on some open I > get a segfault. > > #!/usr/bin/env python > > from PySide import QtCore, QtGui > > class MainWin(QtGui.QMainWindow): > def __init__(self, parent=None): > super(MainWin, self).__init__(parent) > > self.setCentralWidget(QtGui.QMdiArea()) > > self.myaction = QtGui.QAction("add win", self) > self.myaction.setShortcut("Ctrl+F5") > self.myaction.triggered.connect(self.newkid) > self.addAction(self.myaction) > > def newkid(self): > w = QtGui.QWidget() > w.setWindowTitle("hi there") > w.setAttribute(QtCore.Qt.WA_DeleteOnClose) > self.centralWidget().addSubWindow(w) > w.showMaximized() > > if __name__ == '__main__': > app = QtGui.QApplication([]) > w = MainWin() > w.show() > app.exec_() > > Both systems are running PySide 1.1.2 and Qt 4.8.x. > > Indeed, I've modified the example to make a QMdiSubWindow rather than a > QWidget and I have yet to have it crash for me after pounding on the F5 > & W keys as described above. I think I have a fix then for the > immediate issue, but I guess this is a bug for the bug tracker as well > since the qmdiarea docs imply this should work. I think I'm with-in > bounds for the documentation at > http://qt-project.org/doc/qt-4.8/qmdiarea.html#addSubWindow . > > Joel > > (Side-note: this is one of the other things that went wrong in my > thread about "RuntimeError: Failed to connect signal" ... the bug hunt > is wide open I guess and expect I'll find other issues) > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -- Timeo Danaos et dona ferentes From stef.mientki at gmail.com Sun Feb 24 22:55:06 2013 From: stef.mientki at gmail.com (Stef Mientki) Date: Sun, 24 Feb 2013 22:55:06 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <51252D17.4010105@netscape.net> References: <5122509C.9060709@gmail.com> <51252D17.4010105@netscape.net> Message-ID: <512A8C3A.2040502@gmail.com> On 20-02-13 21:07, robbert wrote: >> This basically means, that it is now possible to write Python & PySide >> applications that can be installed from standalone APK packages to >> non-rooted user devices, just like any other Android application. > > Great work! This is what I've been waiting for, for a long time. > I followed your guide for creating a package (not building PySide). > I tried this on two machines, both are able to 'build' a package, and > deploy it to the device. Sadly, both packages give the error: > "Unfortunately, PySideExample has stopped". > (Your precompiled package works nicely) > indeed a great job. !! but ... I tried to run the pre compiled version on Samsung Note-10 (runs perfect) and on my Samsung phone S-plus (crashed "Your application encountered a fatal error and cannot continue"). Compiling the package myself, resulted in the same errors as above "Unfortunately, PySideExample has stopped". Any clue what's the problem ? And in more general, what are the possibilities to debug these kind of errors/problems ? thanks, Stef -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.kolman at gmail.com Mon Feb 25 00:50:23 2013 From: martin.kolman at gmail.com (Martin Kolman) Date: Mon, 25 Feb 2013 00:50:23 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <512A8C3A.2040502@gmail.com> References: <5122509C.9060709@gmail.com> <51252D17.4010105@netscape.net> <512A8C3A.2040502@gmail.com> Message-ID: <512AA73F.3090907@gmail.com> 24.2.2013 22:55, Stef Mientki: > On 20-02-13 21:07, robbert wrote: >>> This basically means, that it is now possible to write Python & PySide >>> applications that can be installed from standalone APK packages to >>> non-rooted user devices, just like any other Android application. >> >> Great work! This is what I've been waiting for, for a long time. >> I followed your guide for creating a package (not building PySide). >> I tried this on two machines, both are able to 'build' a package, and >> deploy it to the device. Sadly, both packages give the error: >> "Unfortunately, PySideExample has stopped". >> (Your precompiled package works nicely) >> > indeed a great job. !! but ... > I tried to run the pre compiled version on Samsung Note-10 (runs > perfect) and on my Samsung phone S-plus (crashed "Your application > encountered a fatal error and cannot continue"). > > Compiling the package myself, resulted in the same errors as above > "Unfortunately, PySideExample has stopped". > Any clue what's the problem ? The PySide & QtComponents in the example package were compiled against Android API level [1] 14, which corresponds to Android 4.0. Samsung S-plus is according to what I've found online running Android 2.3, which corresponds to API level 9. The API levels are only forward compatible, meaning API 9 should work on device supporting API 14, but not the reverse. So the next step is to rebuild PySide & Qt Components in the example with lower API level - if the build succeeds, the resulting package with these binaries should work from Android 2.3 all the way to 4.2. > > And in more general, what are the possibilities to debug these kind of > errors/problems ? Application startup & the Qt part of the application prints log messages to the main Android log. This log can be either by an on-device application [2] or with using the Android debugger (adb) tool over usb or network connection. If you have installed the Necessitas SDK, it has adb in the necessitas/android-sdk/platform-tools folder. Once you Android device is in debugging mode, just run adb on PC like this: adb shell logcat And the Android log should show up in the console. For stdout & stderr from the Python code, check: /sdcard/pyside_example_log.txt /sdcard/pyside_example_error_log.txt If no such log file exists, the application crashed before the C++ wrapper could start the Python interpreter. > > thanks, > Stef Best wishes Martin Kolman [1] http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels [2] https://play.google.com/store/apps/details?id=com.nolanlawson.logcat -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.kolman at gmail.com Mon Feb 25 15:23:12 2013 From: martin.kolman at gmail.com (Martin Kolman) Date: Mon, 25 Feb 2013 15:23:12 +0100 Subject: [PySide] PySide for Android & comprehensive build and usage guide In-Reply-To: <512A8C3A.2040502@gmail.com> References: <5122509C.9060709@gmail.com> <51252D17.4010105@netscape.net> <512A8C3A.2040502@gmail.com> Message-ID: <512B73D0.9020300@gmail.com> I managed to rebuild PySide & the example project and package against Android API level 8, which should theoretically cover all Android versions down to Android 2.2. The updated example package is here: http://modrana.org/platforms/android/pyside_example/PySideExample_1.2.apk I have no physical Android 2.2 or 2.3, so I have not been able to test if it actually works now. :) I've updated the compiled the PySide binaries & the example project on Github. The PySide build scripts on Github were also updated to build agains API level 8 by default. Kind regards Martin Kolman From jmohler at gamry.com Mon Feb 25 18:10:30 2013 From: jmohler at gamry.com (Joel B. Mohler) Date: Mon, 25 Feb 2013 12:10:30 -0500 Subject: [PySide] RuntimeError: Failed to connect signal xxxx In-Reply-To: <512890CA.6080202@skynet.be> References: <51262B0B.1030409@gamry.com> <51265ECD.9000406@m.allo.ws> <51269022.3090607@gamry.com> <512890CA.6080202@skynet.be> Message-ID: <512B9B06.30603@gamry.com> On 2/23/2013 4:50 AM, Stefan Champailler wrote: > Hello, > > > I have never seen that kind of issue but what I've learned the hard > way is that memory leaks can cause very erratic behaviours. > So, as a first step, if you didn't already do so, you should make > sure there are no ownership issues in your code. If you have a large > code base, I found it was easier to simply remove the code part > by part until the problem disappear (and so had I a better idea of > the location of the issue). > > I also found very instructing to reduce the code to a small piece > to reproduce the bug. Doing so help to learn quite a bit about PySide > (because when you reduce code to a minimum you get to know how to > express some ideas in a much better way). > > Either way, I bet you have some work ahead... > > stefan > > > On 02/21/2013 10:22 PM, Joel B. Mohler wrote: >> On 2/21/2013 12:52 PM, Zak wrote: >>> The following idea helped me with a different glitch that was >>> probably unrelated to yours, but who knows, it might help you. Try >>> each of the following: >>> >>> # Signals and slots example >>> # From qt_webview_play.py >>> >>> @Slot(bool) # bool is PySide.QtCore.bool >>> def my_slot(input_bool): >>> pass >>> >>> # The following three lines should be equivalent, but they >>> # are not always equivalent in practice: >>> >>> q_widget.connect(q_widget, SIGNAL("toggled(bool)"), my_slot) >>> q_widget.toggled.connect(my_slot) >>> q_widget.toggled[bool].connect(my_slot) >>> >>> I don't know why they are different, but sometimes they are. My bug >>> arose when I tried to manually disconnect and reconnect signals, >>> specifically the loadFinished(bool) signal on a QWebView widget. >>> >>> In my own experience, it is best to always use the first method, >>> with SIGNAL("toggled(bool)"). I notice that the StackOverflow >>> question you linked uses the third method. Try switching it up and >>> see if anything helps. >> >> Thanks for your comments. I think they were helpful, but the bug >> reproduction process here got pretty weird as I fiddle with this some >> more. I commonly use method 2 to connect signals and slots (I wasn't >> aware of method 3, but I think I see it's necessity at times). I >> changed the one connection to use method 1 and sure enough I think I >> don't get that failure any more. >> >> (and now just a personal tale of woe this has led me down ...) >> However, I now see that regardless of signal/slot issues, that if I >> sit here and open,close,reopen and repeat continuously I'm sure to >> get signal/slot failures and missing attributes and even segfault >> crashes sometime in the first 30 open/close iterations. >> Unfortunately, this widget that I'm closing and reopening has nested >> sub-widgets probably 4 layers deep and many many nuances. It will >> take a while to decode this, but it certainly looks like memory >> corruption. I'm not going to hazard a guess about where to point a >> finger at this point aside to say that pure python pyside shouldn't >> segfault. For the public record in this thread and to indeed confirm Stefan's very accurate statements, I report that the signal/slot issues entirely resolved on their own once I understood the bug which I described at https://bugreports.qt-project.org/browse/PYSIDE-144 . The workaround there was to explicitly create my own QMdiSubWindow explicitly and set my widget with QMdiSubWindow.setWidget. I find this to be an entirely acceptable state of the code for my usage. The moral of the story is that incorrect ownership (somewhere) can indeed cause seemingly arbitrary faults later in the PySide-based application. Stefan's approach of eliminating code piece by piece is virtually the only way that I've been able to come to grips with this and prior PySide experiences of this nature. This is grotesque, but quick python debug cycles and revision control to know all your slicing & dicing changes make it quite doable. Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmohler at gamry.com Mon Feb 25 18:14:19 2013 From: jmohler at gamry.com (Joel B. Mohler) Date: Mon, 25 Feb 2013 12:14:19 -0500 Subject: [PySide] open/close QMdiArea subwindows In-Reply-To: <51289218.6010805@skynet.be> References: <5126A3A7.2030804@kiwistrawberry.us> <51289218.6010805@skynet.be> Message-ID: <512B9BEB.9000805@gamry.com> On 2/23/2013 4:55 AM, Stefan Champailler wrote: > Well, I'm not sure but according to the Qmdiarea doc, > addSubwindow does not take ownership of the window. > So when the execution path leaves newkid(), w is deleted > and then QMdiArea looses it as well... > > (but I just read the doc, didn't test) I don't think that justifies the crash. If the w widget goes out of scope then the widget should have never appeared (being entirely torn down by python reference counting on its way out of scope). Either way, I've reported it at https://bugreports.qt-project.org/browse/PYSIDE-144 because I don't think that my app-side python reference issues should cause C level segfault crashes. Joel On 02/21/2013 11:45 PM, Joel B. Mohler wrote: >> TL;DR; QMdiArea claims to take any QWidget in the addSubWindow method. >> However, in PySide, this appears to work but it will almost certainly >> segfault after many (or few) open/close cycles. >> >> I get a segfault in both windows and linux on the following code. After >> opening and closing the window created in "newkid" 4-50 times. I simply >> start the program and press Ctrl+F5, Ctrl+W repeatedly activating the >> QAction and using the platform specific close sub-window shortcut. The >> nondescript newkid widget appears and disappears until on some open I >> get a segfault. >> >> #!/usr/bin/env python >> >> from PySide import QtCore, QtGui >> >> class MainWin(QtGui.QMainWindow): >> def __init__(self, parent=None): >> super(MainWin, self).__init__(parent) >> >> self.setCentralWidget(QtGui.QMdiArea()) >> >> self.myaction = QtGui.QAction("add win", self) >> self.myaction.setShortcut("Ctrl+F5") >> self.myaction.triggered.connect(self.newkid) >> self.addAction(self.myaction) >> >> def newkid(self): >> w = QtGui.QWidget() >> w.setWindowTitle("hi there") >> w.setAttribute(QtCore.Qt.WA_DeleteOnClose) >> self.centralWidget().addSubWindow(w) >> w.showMaximized() >> >> if __name__ == '__main__': >> app = QtGui.QApplication([]) >> w = MainWin() >> w.show() >> app.exec_() >> >> Both systems are running PySide 1.1.2 and Qt 4.8.x. >> >> Indeed, I've modified the example to make a QMdiSubWindow rather than a >> QWidget and I have yet to have it crash for me after pounding on the F5 >> & W keys as described above. I think I have a fix then for the >> immediate issue, but I guess this is a bug for the bug tracker as well >> since the qmdiarea docs imply this should work. I think I'm with-in >> bounds for the documentation at >> http://qt-project.org/doc/qt-4.8/qmdiarea.html#addSubWindow . >> >> Joel >> >> (Side-note: this is one of the other things that went wrong in my >> thread about "RuntimeError: Failed to connect signal" ... the bug hunt >> is wide open I guess and expect I'll find other issues) >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> From tismer at stackless.com Tue Feb 26 01:26:31 2013 From: tismer at stackless.com (Christian Tismer) Date: Tue, 26 Feb 2013 01:26:31 +0100 Subject: [PySide] PySide evaluation In-Reply-To: <512551AB.7010700@wingware.com> References: <50F42A29.5070106@wingware.com> <50F44B86.2030307@wingware.com> <50F47737.6040000@bluewin.ch> <50F5910D.6080607@bluewin.ch> <50F98D76.4020902@bluewin.ch> <5125442D.30709@bluewin.ch> <512551AB.7010700@wingware.com> Message-ID: <512C0137.9000602@stackless.com> Hi there! I was sick with flu for the last two weeks. Added my questionaire just today ;-) cheers -- chris On 20.02.13 23:43, Stephan Deibel wrote: > Aaron Richiger wrote: >> Many thanks to 82 persons having filled in the PySide evaluation. This >> is quite an impressive number, so the results are quite representative >> and there are at least 82 PySide users out there, this is definitively >> more than "dead":-)! > Thanks very much for doing this! > > For what it's worth: Wingware would certainly consider paying for > development work that solves the specific problems that we have with > PySide, rather than doing it ourselves. I think we'ld focus on bug > fixes but it could go beyond that over time, depending on how things go. > > Hopefully this is also true of the other people that checked "over $1K" > on the survey. > > - Stephan > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- Christian Tismer :^) Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de phone +49 173 24 18 776 fax +49 (30) 700143-0023 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ From schampailler at skynet.be Tue Feb 26 21:09:44 2013 From: schampailler at skynet.be (Stefan Champailler) Date: Tue, 26 Feb 2013 21:09:44 +0100 Subject: [PySide] open/close QMdiArea subwindows In-Reply-To: <512B9BEB.9000805@gamry.com> References: <5126A3A7.2030804@kiwistrawberry.us> <51289218.6010805@skynet.be> <512B9BEB.9000805@gamry.com> Message-ID: <512D1688.7010204@skynet.be> Well, I've tested my hypothesis (see bug reports) but it didn't solve anything... So really looks like a bug.... I've read the Shiboken stuff, but I can't make any sense of it. Should read about that... stF On 02/25/2013 06:14 PM, Joel B. Mohler wrote: > On 2/23/2013 4:55 AM, Stefan Champailler wrote: >> Well, I'm not sure but according to the Qmdiarea doc, >> addSubwindow does not take ownership of the window. >> So when the execution path leaves newkid(), w is deleted >> and then QMdiArea looses it as well... >> >> (but I just read the doc, didn't test) > I don't think that justifies the crash. If the w widget goes out of > scope then the widget should have never appeared (being entirely torn > down by python reference counting on its way out of scope). Either way, > I've reported it at https://bugreports.qt-project.org/browse/PYSIDE-144 > because I don't think that my app-side python reference issues should > cause C level segfault crashes. > > Joel > > On 02/21/2013 11:45 PM, Joel B. Mohler wrote: >>> TL;DR; QMdiArea claims to take any QWidget in the addSubWindow method. >>> However, in PySide, this appears to work but it will almost certainly >>> segfault after many (or few) open/close cycles. >>> >>> I get a segfault in both windows and linux on the following code. After >>> opening and closing the window created in "newkid" 4-50 times. I simply >>> start the program and press Ctrl+F5, Ctrl+W repeatedly activating the >>> QAction and using the platform specific close sub-window shortcut. The >>> nondescript newkid widget appears and disappears until on some open I >>> get a segfault. >>> >>> #!/usr/bin/env python >>> >>> from PySide import QtCore, QtGui >>> >>> class MainWin(QtGui.QMainWindow): >>> def __init__(self, parent=None): >>> super(MainWin, self).__init__(parent) >>> >>> self.setCentralWidget(QtGui.QMdiArea()) >>> >>> self.myaction = QtGui.QAction("add win", self) >>> self.myaction.setShortcut("Ctrl+F5") >>> self.myaction.triggered.connect(self.newkid) >>> self.addAction(self.myaction) >>> >>> def newkid(self): >>> w = QtGui.QWidget() >>> w.setWindowTitle("hi there") >>> w.setAttribute(QtCore.Qt.WA_DeleteOnClose) >>> self.centralWidget().addSubWindow(w) >>> w.showMaximized() >>> >>> if __name__ == '__main__': >>> app = QtGui.QApplication([]) >>> w = MainWin() >>> w.show() >>> app.exec_() >>> >>> Both systems are running PySide 1.1.2 and Qt 4.8.x. >>> >>> Indeed, I've modified the example to make a QMdiSubWindow rather than a >>> QWidget and I have yet to have it crash for me after pounding on the F5 >>> & W keys as described above. I think I have a fix then for the >>> immediate issue, but I guess this is a bug for the bug tracker as well >>> since the qmdiarea docs imply this should work. I think I'm with-in >>> bounds for the documentation at >>> http://qt-project.org/doc/qt-4.8/qmdiarea.html#addSubWindow . >>> >>> Joel >>> >>> (Side-note: this is one of the other things that went wrong in my >>> thread about "RuntimeError: Failed to connect signal" ... the bug hunt >>> is wide open I guess and expect I'll find other issues) >>> _______________________________________________ >>> PySide mailing list >>> PySide at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/pyside >>> > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > -- Timeo Danaos et dona ferentes From connectingtoanas at gmail.com Thu Feb 28 12:54:36 2013 From: connectingtoanas at gmail.com (Anas Kanon) Date: Thu, 28 Feb 2013 17:24:36 +0530 Subject: [PySide] Network Modules Message-ID: Hi friends, I am new to Python programming. I have recently learned Python. Now I have to develop a program for a Network Intrusion Detection System. For, that I am going need some advice or the steps to follow to accomplish this task. And I think I might have network related Python modules for that. Please suggest me the steps to develop this program. Thanks -- *BEST REGARDS* * * *FROM * A N A S K A N O N * * #3/16 K K Lane King Street Matale 21000 Sri Lanka +94719137323 +94777595875 -------------- next part -------------- An HTML attachment was scrubbed... URL: