Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
850 Topics 3.3k Posts
  • 0 Votes
    5 Posts
    5k Views
    N

    Nvm, got it:
    @
    if a != "":
    list = tree2.findItems(a, QtCore.Qt.MatchExactly, 0)
    for i in list:
    tree2.setCurrentItem(i)@

    Hope that helps for anyone else!! :)

  • QtScript and XML

    7
    0 Votes
    7 Posts
    5k Views
    F

    BTW, here is the link to this issue: https://code.google.com/p/qtscriptgenerator/issues/detail?id=81

  • Why QScriptValue and not QVariant?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Clicked() signal for QListView in Ruby

    3
    0 Votes
    3 Posts
    3k Views
    O

    Hello CeesZ,

    Looks great I will try!

  • Uniform Qt bindings for JRuby and Ruby

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Basic Text editor with QTJambi

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Pyside QThreadPool problem

    2
    0 Votes
    2 Posts
    4k Views
    G

    By changing line 7:
    @class Test:@

    to
    @class Test(object):@

    it's not running into segfaults anymore on my system.

    Using old-style classes (not using the ultimate 'object' base class) in Python is being discouraged for quite some time now and this makes me think PySide can't handle them, or this is just a bug.

  • PyQt Phonon Video Player memory leak

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QtJambi 4.8 incl. Qt3D

    8
    0 Votes
    8 Posts
    5k Views
    F

    @Smar: okay good :) I haven't tried QtJambi yet but lately my interest into a Java-Qt binding has increased much so I tried to find out about progress but finding up2date information was pretty hard.

    Imho blogging more often would help to some part - especially about the "roadmap"
    maybe a post about "how to help" would also be good (simple junior tasks?)

    Are there any plans for Qt5 yet? What about the whole QtScript/V8 stuff?

    Maybe a "live ticker" of commits somewhere visible on the homepage to help show the project is alive.

    [edit:] and no the "Recent activity" link doesn't help that much because on gitorious the first repository visible is shown as unmaintained and if you scroll down to the list of recent activity there are 90% of activity of repo creation/deletion - which doesn't show coding progress :( So a commit tracker of qtjambi-community (that's the current head isn't it?) may be the right thing.

  • [PySide]How to emit a multi-arguments signal.

    3
    0 Votes
    3 Posts
    3k Views
    R

    This one.

    @self.findPrevious.emit(text, cs)@

    But, I think signal can not emit multi-arguments in PySide.

    However, C++ can it.

    @emit findPrevious(text, cs);@

  • Compiling Qt Jambi for QT 4.8 fails

    3
    0 Votes
    3 Posts
    3k Views
    S

    Yes, I've completely forgotten about writing it here. This is indeed the solution. The comments in the buildpath.properties kinda confused me, I thought setting the QTDIR variable would configure everything but that was not the case.

    Thanks for writing the solution here.

  • PySide: 'QtGui.framework Library not Loaded'

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt metamodel

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Custom signals

    2
    0 Votes
    2 Posts
    2k Views
    D

    Yes, as signal is member of class instead of instance.

  • PySide passing parent self to child widgets

    2
    0 Votes
    2 Posts
    3k Views
    A

    Apologies, suddenly it occurred to me, so in case someone else is wondering too:

    self keeps the scope of the object alive

    for example if a child widget is created in a parent method, the child will be garbage collected by python if self is not passed to it (making the object a child of the parent widget) or a reference is kept on the parent object i.e.

    @

    example 1

    def create_tray_icon(self):
    # without self the tray object is deleted on exit of this method
    # but passing self makes the parent widget own the child object
    tray = QtGui.QSystemTrayIcon(QtGui.QIcon(":/icon.png"), self)
    @
    @

    example 2

    def create_tray_icon(self):
    # we don't pass self but the parent has a reference to tray (self.tray)
    # so the tray object will not be deleted until the parent is.
    self.tray = QtGui.QSystemTrayIcon(QtGui.QIcon(":/icon.png"))
    @

  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Populating table cells with various widgets

    7
    0 Votes
    7 Posts
    9k Views
    F

    bq. for scalability reasons, the Q*Widget should only be used for static content

    you mean in this case using QTableWidget will be too slow for large tables as opposed to sub classing QTableView and building the required stuff yourself?
    Someone pointed out the QTableWidget.setCellWidget method which lets you do what I'm after very easily, but according to what you are suggesting this will become a problem?
    I'm just really trying to learn things the right way if possible so please excuse my ignorant questions

    bq. You are in charge of creating the corresponding widget for the cell. This is the QStyledItemDelegate::createEditor role.

    thanks, I will investigate that more.

  • Functional programming languages and Qt

    20
    0 Votes
    20 Posts
    20k Views
    I

    I have no clue how would you map things, but from my standpoint, it doesn't seem possible. Templates here are used for things that java generics can't do... heck, not even all C++ compilers can process the code :)

    The library is at http://gitorious.org/qt-functional

    Not sure how many more improvements it will receive in the next period. Hoping I'll have the times to work on it again in a few months.

  • 0 Votes
    2 Posts
    4k Views
    E

    For future reference, I have come up with a solution to the problem.
    See here
    http://stackoverflow.com/questions/9490453/ctrlalt-key-modifier-behavior-with-qt-on-windows-when-a-textbox-has-focus

  • 0 Votes
    3 Posts
    3k Views
    B

    After digging around more I suspect I need to set centralwidget to the new window object to keep everything in the same main window context.

    Advice still welcome ;-)