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
  • Java compiler for Qt4 on visual studio 2005

    2
    0 Votes
    2 Posts
    2k Views
    T
    Just putting Qt4 into the headline does not make this a Qt question. Just use google to find a download link for Java!
  • 0 Votes
    2 Posts
    3k Views
    M
    sorry, my mistake i had to pass string type argument instead of int for 'inputVal' in return QtGui.QValidator.Invalid,inputVal,pos
  • Phonon + QBuffer

    2
    0 Votes
    2 Posts
    3k Views
    L
    sorry... In a Video c'tor : @ Video::Video(QBuffer *source,QWidget *parent) { m_source = new Phonon::MediaSource(source); m_media = new Phonon::MediaObject(ui.label); m_video = new Phonon::VideoWidget(ui.label); m_video->setGeometry(0,0,ui.label->width(),ui.label->height()); Phonon::createPath(m_media,m_video); m_media->setCurrentSource(*m_source); } @ and in Video:play @ m_media->play(); @
  • QProcess in loop inside QThread and update UI-QProgressBar

    Locked
    3
    0 Votes
    3 Posts
    4k Views
    G
    This is a duplicate of "this thread":http://developer.qt.nokia.com/forums/viewthread/9899/. Closed.
  • How to pass array/list in signal and emit the signal?

    6
    0 Votes
    6 Posts
    8k Views
    M
    Hi, Here is the info: PySide: created a signal : signalTextChanged=QtCore.Signal(list,str) emitting the signal : self.emit(QtCore.SIGNAL('signalTextChanged(list,str)'),names,prefix) Error: TypeError: Unknown type used to emit a signal: list
  • [Moved] How to use QProcess in a loop?

    10
    0 Votes
    10 Posts
    6k Views
    G
    I moved this thread to the mentioned forum. You find the link at the top of the page in the bread crumbs just above the thread title.
  • Qt + OCaml

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • How to set the depth of QWidget???

    2
    0 Votes
    2 Posts
    2k Views
    G
    Hi there I may be misunderstanding your question, but you mention that your button is the same size as the window? That makes me wonder if you haven't perhaps forgotten to set layouts on your widget: "Layout Management":http://developer.qt.nokia.com/doc/qt-4.7/layout.html It could be beneficial to you if you posted some code here as it will help to understand your question :)
  • Compiling apiextractor on Mac OS X failed (lib not found libxml2)

    5
    0 Votes
    5 Posts
    6k Views
    U
    OK, will do, thanks. By the way, after some probing I found my libxml2.framework under /Library/Frameworks seems to be corrupted for some reason. This explains why the linker can't link it even though cmake "recognizes" the framework. Thanks for all the info.
  • [Moved] How to use QSettings to read and write from xml file?

    9
    0 Votes
    9 Posts
    8k Views
    A
    The QSettings API basically just provides a sectioned list of key-value pairs. Why would you want to use it to interact with a possibly deeply nested hierarchical structure like XML? Even if it is possible to do so (I found out that it is not trivial), the API just isn't a very good match for it.
  • QListWidget Drag & Drop External File Drop and Internal Reordering

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • [Moved] How to rotate QPushButton?

    10
    0 Votes
    10 Posts
    16k Views
    J
    I got help from StackOverflow, and the "above example":http://www.qtcentre.org/wiki/index.php?title=OrientationButton was translated to Python properly. Now I need to figure out what it's really doing :) @#!/usr/bin/env python from PyQt4 import QtGui, QtCore import sys class RotatedButton(QtGui.QPushButton): def init(self, text, parent, orientation = "west"): super(RotatedButton,self).init(text, parent) self.orientation = orientation def paintEvent(self, event): painter = QtGui.QStylePainter(self) painter.rotate(90) painter.translate(0, -1 * self.width()); painter.drawControl(QtGui.QStyle.CE_PushButton, self.getSyleOptions()) def minimumSizeHint(self): size = super(RotatedButton, self).minimumSizeHint() size.transpose() return size def sizeHint(self): size = super(RotatedButton, self).sizeHint() size.transpose() return size def getSyleOptions(self): options = QtGui.QStyleOptionButton() options.initFrom(self) size = options.rect.size() size.transpose() options.rect.setSize(size) options.features = QtGui.QStyleOptionButton.None if self.isFlat(): options.features |= QtGui.QStyleOptionButton.Flat if self.menu(): options.features |= QtGui.QStyleOptionButton.HasMenu if self.autoDefault() or self.isDefault(): options.features |= QtGui.QStyleOptionButton.AutoDefaultButton if self.isDefault(): options.features |= QtGui.QStyleOptionButton.DefaultButton if self.isDown() or (self.menu() and self.menu().isVisible()): options.state |= QtGui.QStyle.State_Sunken if self.isChecked(): options.state |= QtGui.QStyle.State_On if not self.isFlat() and not self.isDown(): options.state |= QtGui.QStyle.State_Raised options.text = self.text() options.icon = self.icon() options.iconSize = self.iconSize() return options class Main(QtGui.QFrame): def init(self): QtGui.QFrame.init(self) self.application = QtCore.QCoreApplication.instance() self.layout = QtGui.QHBoxLayout() self.button = RotatedButton("Hello", self, orientation="west") self.layout.addWidget(self.button) self.setLayout(self.layout) if name == 'main': application = QtGui.QApplication(sys.argv) application.main = Main() application.main.show() sys.exit(application.exec_()) @
  • 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]
  • [Solved] PySide new Mac OS install can't load QtCore.so

    3
    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.
  • Will there ever be complete JavaScript bindings?

    6
    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?
  • [solved] PySide/PyQT4: Catching SIGUSR1 to trigger a Signal

    3
    0 Votes
    3 Posts
    5k Views
    C
    Thanks a lot, it works!