Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
850 Topics 3.3k Posts
  • [SOLVED] Using Prolog in my c++ app

    5
    0 Votes
    5 Posts
    2k Views
    SGaistS

    You're welcome !

    If this replies to your question, please, update the thread title prepending [solved] so other forum users may know a solution has been found :)

  • Qt GUI with OpenCV C API

    2
    0 Votes
    2 Posts
    1k Views
    SGaistS

    Hi and welcome to devnet,

    Yes it is, however depending on your needs, OpenCV provides highgui which can be build to use Qt.

  • Writing to/reading from disk via QDataStream()

    6
    0 Votes
    6 Posts
    2k Views
    SGaistS

    Very good suggestion, less dependencies is better.

    QComboBox doesn't have a setData function, did you mean setItemData ? When using QComboBox you don't have to handle the item themselves only their content

  • Is bindVariable() in the XML classes two-way?

    3
    0 Votes
    3 Posts
    988 Views
    N

    Oh I'm so sorry, my apologies

  • 0 Votes
    2 Posts
    2k Views
    T

    I'm looking at C++ Reference, so I may be wrong about this but in Qt C++ addItem / setItemData declaration shows "QVariant". maybe you might want to use row index or "Item n" for the ItemData

  • 0 Votes
    1 Posts
    647 Views
    No one has replied
  • Set waitcursor on qtextedit

    5
    0 Votes
    5 Posts
    3k Views
    B

    Switch to QProcess, which is what I intended to use from the start, and had some success.

    I can now set the wait cursor for the textWidget only.

    @def run_process(self):
    self.textEdit.viewport().setCursor(Qt.WaitCursor)
    self.textEdit.clear()
    self.textEdit.append("Standby, this proc takes time.")
    self.runner = QProcess(self)
    self.runner.readyReadStandardOutput.connect(self.GetStd)
    self.runner.start('ext_proc.sh')

    def GetStd(self)
    StdOut = str(self.runner.readAllStandardOutput())
    self.textEdit.append(StdOut)
    self.textEdit.viewport().setCursor(Qt.IBeamCursor@

    The problem now is that the Ibeam cursor is reset upon the first input of standard out. However, ext_proc.sh is still running.

    Tried some things with waitForFinished() but it froze the interface.

    Is there a way to keep the wait cursor until the external process is complete without locking the GUI?

    Thanks in advance,
    Cheers,

  • 0 Votes
    2 Posts
    2k Views
    T

    After working with some examples found on the web, my paint function looks like this now. My understanding the below code should render - but respect the stylesheet.
    @
    def paint(self, painter, option, index):
    super(MyStyleDelegate, self).paint(painter, option, index)

    modelIndex = index model = index.model() if isinstance(model, QtGui.QAbstractProxyModel): modelIndex = model.mapToSource(index) options = QtGui.QStyleOptionViewItemV4(option) self.initStyleOption(options, index) style = options.widget.style() if options.widget else QtGui.QApplication.style() style.drawControl(style.CE_ItemViewItem, options, painter, options.widget) QtGui.QStyledItemDelegate.paint(self, painter, option, modelIndex)

    @

    Some thing of interest - my options.widget is always None. Would that have the the effect that I'm seeing?

  • Datachanged signal does not work

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Run Qt Jambi From Eclipse

    7
    0 Votes
    7 Posts
    9k Views
    Q

    Windows7 中文

  • Set widget style from a menu selection.

    3
    0 Votes
    3 Posts
    1k Views
    B

    Found the solution "here":http://stackoverflow.com/questions/1100775/create-pyqt-menu-from-a-list-of-strings.

    Change the triggered statement to "self.action.triggered.connect(lambda style=style self.changeStyle(self.action.text()))"

  • Qt Island in a C# application?

    1
    0 Votes
    1 Posts
    847 Views
    No one has replied
  • 0 Votes
    10 Posts
    5k Views
    B

    Still new to PySide but learning. My motivation for this was to isolate the GUI/interface coding from the functional coding.

    I found a way to reference .ui xml files created in qt designer directly. Now I can easily make changes to the ui without having to touch the python code at all.

  • Type errors using QInputDialog()

    3
    0 Votes
    3 Posts
    2k Views
    B

    Replaced 'self' with 'MainWindow' and the function worked.

  • 0 Votes
    1 Posts
    631 Views
    No one has replied
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • QtJambi AWTBridge 64bit

    1
    0 Votes
    1 Posts
    745 Views
    No one has replied
  • PySideQwt revival

    10
    0 Votes
    10 Posts
    5k Views
    R

    http://www.pyqtgraph.org/
    pyqtgraph is a good alternative!

  • 0 Votes
    1 Posts
    802 Views
    No one has replied
  • 0 Votes
    5 Posts
    2k Views
    S

    Ahh, I didn't know about QLocalServer. I had originally looked at using python's socket library, but I didn't think about checking out Qt's. If it transparently handles signal/slots that might be the easiest approach. I'll give it a shot. Thanks!

    Edit: Okay, it looks like it doesn't handle signal/slots in the way I thought you meant. It doesn't transparently send them over the network. There does appear to be a third party library for that (QxtRPCPeer), but it doesn't have python bindings. I guess I'm stuck either going without a child GUI process or reimplementing the functionality provided by multiprocessing.Pipe.