I think I did find a partial solution.
the nokia N900 has QtMobility 1.0.2 officially installed with the PR1.3 update. Through the pachages libqtm-11-dev or libqtm-12-dev is it possible to install the QtMobility 1.1 or 1.2. These libraries are installed in parallel to the official one, that's why the official python-qtmobility package is linked to the 1.0.2 version.
In maemo extras-devel I found another package:
these are the python libraries linked to the non official QtMobility 1.1 and as well can be installed in parallel to the official one. Infact the have been saved in:
I did create a symbolic link to these libraries in the officialfolder in which python is looking for:
ln -s /opt/qtm11/lib/python2.5/site-packages/QtMobility/ ./QtMobility11@
In these way I can access the QtMObility 1.1 from python:
@[sbox-FREMANTLE_X86: ~] > run-standalone.sh python2.5
Python 2.5.4 (r254:67916, May 17 2010, 21:11:14)
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from QtMobility11 import Location
print dir (Location)
['QGeoAddress', 'QGeoAreaMonitor', 'QGeoBoundingArea', 'QGeoBoundingBox',
'QGeoBoundingCircle', 'QGeoCoordinate', 'QGeoManeuver', 'QGeoMapCircleObject',
'QGeoMapData', 'QGeoMapGroupObject', 'QGeoMapObject', 'QGeoMapObjectInfo',
'QLandmarkRemoveRequest', 'QLandmarkSaveRequest', 'QLandmarkSortOrder',
'QLandmarkUnionFilter', 'QNmeaPositionInfoSource', '_Cpp_Api', 'doc', 'file', 'name']@
As you can see there is now access to all the Location classes from QtMobility 1.1
Hope this can help in case you encounter similar trouble, and hope somewhen also a package for the 1.2 version appears... unfortunately I'm not able to do it myself :)
Thanks for the tip! It did solve the issue with the RuntimeError, but unfortunately I still don't see the button in the QML scene :(
If I discover how to make it work I will post it...
Thanks, Renato! The previous version works.
I'm really enjoying experimenting with PySide by the way. I've been waiting a long time for this and it is exceeding my expectations. Awesome work, guys!
This answer may be a little help but I hope it helps someone nevertheless.
In ImageWidget.loadImage, you create anim as a local variable. That means it's going to be garbage collected at the end of th call : as soon as the call is over, the animation is deleted, and won't have any effect.
There is two ways to solve the problem :
Define anim as an object attribute (@self.anim = …@)
Set anim as a child of the current object, so that it keeps a reference to anim and prevent the garbage collection (@anim = QtCore.QPropertyAnimation(pixmap, "opacity", self)@)
The problem was this line in dummgentest-project.txt.in
@output-directory = /tmp/output@
on windows this is likely going to fail. How about ./tmp-output?
I had to use a debugger to trace to see what files generatorrunner was opening.
The tests all pass on Visual Studio Pro 2005 x64
Thanks for the help,
I shared this recipe on my blog, with a QSingleApplication class for PySide that allows you to be sure your program will be started only once.
In addition to start the application only once, we can send the arguments of the later calls of your program to the first (and only remaining) instance.
Well the main code of the mock up example is there:
The main class it is using is there:
However, the error is raised almost never...
I even could not get the error after trying the mock up example more than 50 times.
Maybe I already fixed the error.
It used to appear sometimes only.
I'm not sure this mock-up is very meaningful, but maybe some people might find some huge mistakes in the main class.
This is very crappy coding by the way, this is my first PySide program and it was rapidly coded...
Oh yeah I didn't notice I have to "accept" the drag first, thanks ;)
If it helps anyone who was also wondering how to do a drag an drop in PySide, here is my working code:
def dropEvent(self, event):
def dragEnterEvent(self, event):
m = event.mimeData()
self.dropFile = m.urls().toLocalFile()
I never worked with native Cocoa/XIB files, so I cannot comment on this one. I would dig deeper into the alien widgets topic, though. Maybe "QMacCocoaViewContainer":http://doc.qt.nokia.com/latest/qmaccocoaviewcontainer.html can be of help for you here. It contains an example for including a NSSearchField into a Qt widget.
Hi Mifik! Congratulations - did not work for me. When installing one of the other packages, I receive a message "Python version 2.5 required". So you also installed Python 2.5?
I downloaded and installed Python 2.7.1 from http://python.org/download/. Which version did you use?
I think this is solution of your problem:
from PySide.QtGui import *
ImportError: /usr/local/lib/python2.7/site-packages/PySide/QtGui.so: Undefined symbol "_ZN9QGtkStyle11qt_metacastEPKc"
The current solution is to rebuild py-gui after changing your /etc/make.conf to include:
QT4_OPTIONS += QGTKSTYLE
The (partial) solution was this:
This ensures that individual items handle their own events, it seems that before the group was capturing them.
I still have a problem in that my GraphicsView overrides the mouseMoveEvent, and when enabled, no events get propagated to scene items.
Woops, I found the reason by myself...
@class myClass(anotherLib.originalClass, QtCore.QObject):
Adding the QObject parent class and calling it during the init
[quote author="pmcfrack" date="1300306178"]I know this is a rather old post, however, this is the exact problem I am trying to work around. Here is a link to my question: http://developer.qt.nokia.com/forums/viewthread/4402/#26159
Does anyone have a work around for this?
Perhaps you should start responding in that thread then again? It is not like you did not get any reactions there...
This QtWui looks like stuff you build on server and then you use it with normal browser? I don’t really get the benefit of this framework... Or is it something like Rails? Its website doesn’t really tell.
OTOH Jambi is Qt bindings for Java. But because it is Java, it should be possible to use Jambi in applets and JNLP stuff. If you are just wanting to write something for web server, you’re most likely better off with Qt/cpp, since you already know it.
[quote]That's why editing headers is difficult :-)[/quote]
Oey, In the back of my mind I was thinking the same thing.
Aside from a custom widget (have yet to figure out painting),
editing works if passing header information into an external dialog.
Not exactly what I intended for the user, but it works :)
Thank you for your kind help.