Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
850 Topics 3.3k Posts
  • Using PythonXY and PyQt

    2
    0 Votes
    2 Posts
    6k Views
    B

    use
    db = QSqlDatabase.addDatabase("QMYSQL")
    at line 12.

  • How to extend method expanded in QTreeView

    7
    0 Votes
    7 Posts
    4k Views
    S

    Got it, thx.
    [quote author="Andre" date="1314770348"]expanded() is a signal, and is as leon.anavi rightly points out, not virtual. Instead of subclassing and reimplenting the method, why not simply create a new slot in your subclass, and connect to the signal instead?[/quote]

  • 0 Votes
    3 Posts
    16k Views
    D

    I have set a symbolic link ~/QtSDK to where I installed Qt, so it should look as if it was installed in the default location.

    Also I have exported DYLD_LIBRARY_PATH=/Developer/SDKs/QtSDK/Desktop/Qt/473/gcc/lib/

    Neither step makes any difference, the message is the same as before.

  • Signal connect with different class

    8
    0 Votes
    8 Posts
    6k Views
    A

    I think you could have solved it with just an additional closing parentheses ) after the connect statement in your original code...

  • Enable auto-rotation in QWebView

    2
    0 Votes
    2 Posts
    3k Views
    J

    I have changed to qml instead of pure python gui definition. Now I use this qml file, and it seems to work as expected:
    @import QtQuick 1.0
    import QtWebKit 1.0
    import com.nokia.meego 1.0

    Window {
    id: rootWindow
    WebView {
    id: webView
    anchors.fill: parent

    settings.javascriptEnabled: true
    settings.localStorageDatabaseEnabled: true
    settings.offlineStorageDatabaseEnabled: true
    settings.offlineWebApplicationCacheEnabled: true

    url: 'http://www.nokia.com'
    }
    }@

  • Fetch the command through PyQt

    2
    0 Votes
    2 Posts
    2k Views
    D

    Start with the tutorials and the examples. You need to learn the basic building blocks of such an application (and in general, the core Qt technologies). The main classes you're looking for are QLineEdit, QPlainTextEdit, QProcess.

  • 0 Votes
    6 Posts
    5k Views
    P

    I just installed the following Debian packages:
    qtscript-tools
    libqtscript4-qtbindings
    libqtscript4-doc

    $ cd /usr/share/doc/libqtscript4-doc/examples
    $ qs_eval CollidingMice.js

    It looks just like the c++ one.

    After trawling the web like you guys have, it's surprising that this isn't mentioned more prominently as a Qt resource.

    What's up with that?

  • 0 Votes
    3 Posts
    5k Views
    C

    Thanks a lot, it works!

  • 0 Votes
    2 Posts
    4k Views
    M

    Hi All,
    Never mind i solved it myself any ways thanks. Actually i had to generate ".qm" file for ".ts" then i have to replace "zh_CN.ts" with "zh_CN.qm" then everything worked great.

    @ translator.load("zh_CN.qm") @

  • [SOLVED] Pyside, Pil image to QPixmap

    4
    0 Votes
    4 Posts
    21k Views
    J

    The reason why it probably crashes on Windows 7, is that the Python interpreter loses the reference to image data, and frees the memory.

    For instance, in "PIL ImageQt.py":http://www.java2s.com/Open-Source/Python/GUI/Python-Image-Library/Imaging-1.1.7/PIL/ImageQt.py.htm the image data reference is separately stored into a class member variable:

    @
    # must keep a reference, or Qt will crash!
    self.__data = data or im.tostring()
    @

    Once I did this in my conversion function/class, the conversion method works flawlessly on Windows 7. The reason why QPixmap doesn't save the data reference correctly to prevent automatic garbage collection (I guess) is a bit beyond me.

  • [SOLVED ]All focus, all the time

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    6 Posts
    3k Views
    U

    Hi all,
    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:
    @python-qtmobility11@
    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:
    @/opt/qtm11/lib/python2.5/site-packages/QtMobility/@
    I did create a symbolic link to these libraries in the officialfolder in which python is looking for:

    @cd /usr/lib/python2.5/site-packages/
    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 :)

  • Hybrid Applications with PySide

    6
    0 Votes
    6 Posts
    6k Views
    X

    I was reading about PySide and PyQt... but this is new for me! thanks! :P

  • 0 Votes
    3 Posts
    5k Views
    U

    Hi Renato!
    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...
    ciao
    nic

  • PySide and QAxWidget

    2
    0 Votes
    2 Posts
    3k Views
    R

    Unfortuatly the pyside team does not have any plans for make bindigs avaliable for this widget. But this bindings can be provide for someone from the community.

  • Pyside-rcc Generates Invalid Python

    5
    0 Votes
    5 Posts
    4k Views
    M

    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!

    Mark.

  • [Moved] Qt Xembed on Java ?

    4
    0 Votes
    4 Posts
    2k Views
    T

    this is wrong place to post

  • 0 Votes
    8 Posts
    4k Views
    T

    [quote author="rockdude" date="1308655120"]okie :) I'll update here if i get over the issue ! May be will be usefull for someone . Thanks for the reply[/quote]

    have you tried SVGT icon

  • To Subclass NSApplication in QApplication.

    7
    0 Votes
    7 Posts
    6k Views
    N

    Ok, not an issue, i will try to do something else.

  • Printer - One Record per page.

    8
    0 Votes
    8 Posts
    4k Views
    L

    Great! Could you please add [Solved] in front of the title? (Edit the first post)