Skip to content

Language Bindings

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

    11
    0 Votes
    11 Posts
    10k Views
    H

    yes, project created:
    http://gitorious.org/pysideqwt#more

    todo:
    first import all classes,
    second found a way to use numpy.array.

  • 0 Votes
    13 Posts
    12k Views
    G

    a nice blind guess!

    if someone else wants to do the same, or is searching for an example:
    @
    def getImage(self):
    imagen64 = open('call.base64','r').read()
    imagen = QtGui.QImage()
    bytearr = QtCore.QByteArray.fromBase64( imagen64 )
    imagen.loadFromData( bytearr, 'PNG' )
    self.label.setPixmap( QtGui.QPixmap.fromImage(imagen) )
    @
    where:
    call.base64 is a file containing the base64 string with no CR nor LF, with a string of length:1888
    encoded using php:
    @
    $imgfile = "call.png";
    $handle = fopen($imgfile, "r");
    $imgbinary = fread(fopen($imgfile, "r"), filesize($imgfile));
    $fw = fopen('call.base64', 'w');
    fwrite($fw, base64_encode($imgbinary));
    fclose($fw);
    @
    with imports:
    @
    from PySide import QtCore, QtGui
    @

  • Utility panel Widgit: PySide

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Qt Jambi Ubuntu packages

    2
    0 Votes
    2 Posts
    3k Views
    K

    Thanks for sharing

  • 0 Votes
    2 Posts
    3k Views
    V

    Good work, I definitely will give it a try

  • Does Qt support C# using Visual Studio 2008?

    4
    0 Votes
    4 Posts
    13k Views
    J

    I suggest Qyoto. On KDE Techbase I think you can find a way to compile it under Windows

  • 0 Votes
    5 Posts
    4k Views
    L

    I think i don't use it properly because with PyQt and the following code :

    from PyQt4 import QtGui

    fid = open('/tmp/buffer.out','r')
    stringBuffer = fid.read()
    fid.close()

    img1 = QtGui.QImage(640,440, QtGui.QImage.Format_ARGB32)
    img1.loadFromData(stringBuffer)

    img1.save('test_pyqt4_1.png',format='png')

    --> this make an empty png file*

    img2 = QtGui.QImage(stringBuffer,640,440, QtGui.QImage.Format_ARGB32)

    img2.save('test_pyqt4_2.png',format='png')

    --> this make a good png file with my figure

    Any idea how to use loadFromData in the good way so that i can reproduce with pyside??

  • PySide QTableView currentChanged syntax

    3
    0 Votes
    3 Posts
    5k Views
    W

    Hmm, the preview worked ok but evidently something decided to trash half of that line of code. Anyway, I've tried the new form for slots. This does indeed look better in that at least it is a real type that you need to specify for the arguments rather than a string. So I have a subclass of QTableView, and in that I now have:

    from PySide import QtCore # well, this is at the top of the module

    self.currentChanged(QtCore.QModelIndex, QtCore.QModelIndex).connect(selectCallback)

    And now I am getting the error (which does not look good!):

    TypeError: 'PySide.QtGui.QTableView.currentChanged' called with wrong argument types:
    PySide.QtGui.QTableView.currentChanged(Shiboken.BaseWrapperType, Shiboken.BaseWrapperType)
    Supported signatures:
    PySide.QtGui.QTableView.currentChanged(PySide.QtCore.QModelIndex, PySide.QtCore.QModelIndex)

    Wayne

  • Ask Help from beginner

    4
    0 Votes
    4 Posts
    4k Views
    M

    You should follow the Tobias suggestion, having a solid C++ background is pretty useful when learning Qt.
    Probably you already know it but, the "Thinking in C++":http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html is a great book that you can get download for free.

    Anyway the Qt Object Model is a subject on its own, that needs its own explanation, a nice one (with pretty figures :D), is in the L2 "Presentation with notes" of the "Qt Learning material":http://qt.nokia.com/services-partners/qt-in-education/qt-in-education-course-material, altough this material is intended to be used for teaching Qt I think it's clear enough even for the beginners.

    And if you're looking for more detailed explanations check the "Qt eLearning videos":http://qt.nokia.com/developer/learning/elearning, specially the "Qt Training modules":http://qt.nokia.com/developer/learning/online/training/modules your question is answered in the "Objects int Qt" ones.

    Happy learning!

  • PySide: python IDLE lacks compatibility

    7
    0 Votes
    7 Posts
    7k Views
    F

    The fact that QCoreApplication behaves somewhat like a Singleton is bugging me. Although it is obviously sensible to have only one instance of a QCoreApplication around, I can't help but feel that there would be a much more reasonable way to make this work. I mean, if I want to try and drive two cars at the same time, it's the police who will try to stop me, not the car.

  • Linked text in an application?

    3
    0 Votes
    3 Posts
    4k Views
    B

    Thank you very much :D

  • PySide: Issue using ItemDelegate

    4
    0 Votes
    4 Posts
    5k Views
    N

    Yeah, it's a fixed bug, I did not have the latest PySide. In my defense, it was only released two days after I started.

  • PySide Image Formats

    4
    0 Votes
    4 Posts
    5k Views
    M

    tbcpp, Roman Lacko (the guy who volunteered to do the Windows packaging) told he's aware of the issue and the next installer contains the plugins (including a currently missing sqllite plugin).

  • 0 Votes
    5 Posts
    3k Views
    S

    Ah, thanks. I already filed the bug, should I close it?

    Edit: Never mind, I see that someone else closed it for me. Thanks.

  • 0 Votes
    7 Posts
    13k Views
    H

    It remains compatible with PyQt, but with PyQt API2, not API1.

    If you use PyQt with API2 you will get the same behaviour because there's no QString and python string and unicode objects are immutable.

  • Jambi and groovy

    2
    0 Votes
    2 Posts
    3k Views
    S

    No-one has tried this, myself I have been using Icedtea for long.

    You can go and test it yourself, too. We’ll fix the bugs in order to get it to work, no problems with it :)

  • PyQt, DBus, and Custom C++ types.

    2
    0 Votes
    2 Posts
    4k Views
    E

    Would you like to post xml annotations and c++ code that implement custom type

    Is PyQT ... only solution? Do U look at dbus-python? Read this http://stackoverflow.com/questions/1883830/receive-data-from-dbus

  • Language bindings in the wiki

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • PyQt + QML

    7
    0 Votes
    7 Posts
    10k Views
    M

    If you give it a try you won't go back :)

    For example, In PyQt you can connect to signals as simple as this:

    @def myCallback():
    """ This is a simple python function w/o knowing it is a slot """
    print "Button Clicked"
    button.clicked.connect(myCallback)
    @

    or you can do it even more sweeter:

    @@button.clicked.connect
    def myCallback():
    """ This is a simple python function w/o knowing it is a slot """
    print "Button Clicked"
    @

    I just love it!

  • Needed help building PySide

    2
    0 Votes
    2 Posts
    3k Views
    T

    Did you solve it in the meantime? If not you could ask on #pyside on freenode.org for help. AFAIK the devs working on it are hanging out there too.