Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
862 Topics 3.4k Posts
QtWS25 Last Chance
  • Dynamic PropertyGrid with QML and C++

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • 0 Votes
    3 Posts
    2k Views
    G
    Moved to the language bindings forum..
  • I need help working with saveGeometry() and saveState() on Pyside

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    2k Views
    EddyE
    Please don't double post. You asked the same thing in" this thread":http://developer.qt.nokia.com/forums/viewthread/12854/. So i'm closing this one.
  • Qt Jambi: Java bindings for Qt

    7
    0 Votes
    7 Posts
    7k Views
    S
    I must say that I’m sorry for no new releases since last beta. But since then we have actually had quite active development, so we’ll near (hopefully) final beta this year and RC at start of next year. You can see activity log here: http://qt.gitorious.org/qt-jambi Not exactly empty, isn’t it? :) I’ve been working for new website to collect all Jambi related information under same hood. This should be released soon too. 4.8 basically already compiles, but new features aren’t still polished. With current development rate it should arrive shortly after 4.7 release, atleast I hope we can make it so :)
  • Qt creator use .so in linux

    11
    0 Votes
    11 Posts
    8k Views
    G
    Sorry, I have no idea how matlab creates its libraries; I'm out here. Maybe someone in a matlab forum can be of better help, as it doesn't seem to be a Qt problem, but more one of interfacing matlab libs with C++ code.
  • [Solved] QImage.save() generates strange image files

    2
    0 Votes
    2 Posts
    11k Views
    E
    Found the solution! The script isn't generating a image file properly because It doesn't has a QImage.fill(). Upon declaring one, the script generates the image correctly. The following script (a modified version of the first script I posted) does what I needed: @ #!/usr/bin/python -- coding: utf-8 -- import sys from PySide.QtCore import * from PySide.QtGui import * app = QApplication(sys.argv) size = QSize(100,100) picture = QImage(size, QImage.Format_RGB32) picture.fill(32) picture.setAlphaChannel(picture) painter = QPainter() painter.begin(picture) painter.setRenderHint(QPainter.Antialiasing) painter.setBackgroundMode(Qt.TransparentMode) pen = QPen() color = QColor(255,0,0) pen.setColor(color) pen.setWidth(5) pen.setCapStyle(Qt.RoundCap) painter.setPen(pen) painter.drawEllipse(10,10, 80,80) painter.end() imagefile = QImageWriter() imagefile.setFileName("circle") imagefile.setFormat("png") imagefile.setQuality(100) imagefile.write(picture) exit() app.exec_() sys.exit() @
  • [Moved] QGraphicsItem::itemChange not called

    2
    0 Votes
    2 Posts
    4k Views
    B
    Nevermind, I found the bug in the above code and edited it so it now works. But the code would better be: @def itemChange(self, change, value): print "itemChange", change, value return value@ The critical part of the documentation is "The default implementation does nothing, and returns value." More precisely it could say: simply returns the passed parameter having name value, unchanged. There is no reason to call the base class implementation, but you MUST return a result having the same type as the parameter named value. That is, itemChange() is a hook: it is called when Qt has a value for a change and gives you the opportunity to alter the value before Qt uses the value. If you don't return a value properly, the results are unpredictable. The default implementation is an idempotent hook: transmits the value parameter unchanged. Note that itemChange(), like sceneEvent() and a few other methods in the list of protected methods of QGraphicsItem have non-void return value. Be careful to return a value that is not None. Apparently Qt does not do run-time error checking (or at least in the Python binding, a returned value of None passes any type checking that Qt does.) The documentation for itemChange() says "adjustments can be made." This is poor technical writing because it uses the passive voice. It would be better stated: in your reimplementation, you can adjust the value, but you should always return a result having the same type as the parameter named value. The code and documentation would also be better if longer names were used: itemChange(changeType, changeValue). As you can see in my discussion above, it is difficult for readers to distinguish between the parameter having name value, and the value of that parameter. In other words, the word "value" is too abstract and generic. "Return a value" is too easily confused with "return the parameter having name: value".
  • Debugging embedded python

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Writing script for webcam

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Troubleshoot QtCore4!QListData__size Crash through dump files

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QGLBuffer.allocate messes with QGLWidget.renderText

    2
    0 Votes
    2 Posts
    2k Views
    S
    Solved it. I needed to call QGLBuffer.release() before calls to QPainter.
  • Demonstrate picking edges of QGraphicItems

    3
    0 Votes
    3 Posts
    2k Views
    G
    We usually move all non C++ code to the Language Bindings subforum.
  • Interaction of dlls between Qt dll and msvs dll

    2
    0 Votes
    2 Posts
    2k Views
    G
    If you use QtCreator, call new project, select a dll project and that's it, there is a dll. Using a dll is a very basic thing in C/C++ and not Qt related, and it depends on how the dll tio use is created. does it have C exported functions? then you could load it with QLibrary and call resolve to get the function pointers Or you include the header file and linky dynamically to it or it has exported classes, then you MUST link dynamically to it.
  • Any step process for Qt to interact with msmq?

    4
    0 Votes
    4 Posts
    4k Views
    G
    Ok, so you have two buinaries, one in Qt, one in MFC. You want to send the MFC binary (window) messages, right? Use WinAPI SendMessage. To get messages back, you need a top level widgetr (which also is a real window) and overwrite winEvent.
  • 0 Votes
    3 Posts
    2k Views
    M
    I solved it myself anyways thanks for the reply ,
  • Why is QPoint.x() not a property?

    8
    0 Votes
    8 Posts
    6k Views
    B
    I think my earlier link to wiki discussed how properties can be simulated in C++. I'm still wondering whether PySide has not made a design error in their QPoint implementation. Its more Pythonic to make data attributes public (the philosophy is, let the programmer do what they want, even if they get in trouble) without hiding them behind getter/setters. If the developers of PySide later need to intercede, they can use properties to make it still look like a data attribute, but use their defined getter/setter doing whatever intercession they need. But its possible that what the PySide developers can do is constrained. Re: "Qt’s design principles to (NOT) expose otherwise private implementation details as public attributes". In C++? Do those principles necessarily carry over to PySide? After all, a point IS data, two numbers usually called x and y. In other words, that seems to be a rather fundamental "property" of a point. Why obscure that with getter and setters? I don't mean to complain too much, I really appreciate the beauty of Qt and PySide.
  • [Moved] Drag/Drop from ListWidget to GraphicsView

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • PyQT Update QLabel Threading/Signals Issue

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Two full functional QSqlRelationalTables, problem with adding a record

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied