Menu

PythonQt Syntax?

Help
Neosettler
2013-05-25
2013-05-27
  • Neosettler

    Neosettler - 2013-05-25

    Greetings,

    This might be a very dumb question but I can't find the Qt generated binding syntax anywhere... is there any?

    Thx

     
  • Florian Link

    Florian Link - 2013-05-25

    I don't understand your question.

    Are you referring to the syntax of the XML files in the generator directory?

     
  • Neosettler

    Neosettler - 2013-05-25

    Hi Florian, in others words, how do we know which Qt classes, functions, signals and slots are available?

     
  • Florian Link

    Florian Link - 2013-05-26

    I think if you read

    http://pythonqt.sourceforge.net/Features.html

    and

    http://pythonqt.sourceforge.net/Developer.html

    it explains what PythonQt with and without wrappers offers you.

    In short:

    PythonQt without wrappers:
    all signals/slots/properties

    PythonQt with wrappers:
    almost all Qt classes and methods, constructors, deriving from Python, virtual method overriding

     
  • Neosettler

    Neosettler - 2013-05-27

    Thank you Florian, well that's the thing, I'm trying to convert code from PySide and there is few situations rather painful.

    Example:

    class Slider(QtGui.QSlider):
    def init(self, in_style=None, in_parent=None):
    super(Slider, self).init(in_style, in_parent)

    def mousePressEvent(self, in_event):
        opt = QtGui.QStyleOptionSlider()
        self.initStyleOption(opt)
    

    initStyleOption is undefined and Bam... hitting a wall... so I have no clue where to go from there.

    By the way, would it be possible to use PySide Bindings instead? How much work would this imply for you? My guess is that it would be so much easier for everyone that simply need the C++/Python highway that PythonQt provides.

     
  • Florian Link

    Florian Link - 2013-05-27

    I discussed that on the PySide mailing list.

    It would of course be nice, by PythonQt is very dynamic in its nature,
    while PySide is wrapping everything in a quite static way. It is difficult to modify
    PySide to become useable by PythonQt and there is not much support to expect on the PySide side. Honestly to me PySide looks kind of almost-dead, with Nokia and financial support gone, but that is a different story.

    For our product and for people who want an embedded Python/Qt binding,
    I think PythonQt works quite well (apart from you CMake troubles).

     
  • Neosettler

    Neosettler - 2013-05-27

    I see, the one good thing with PySide and/or PyQt is that it is widely used so it is very convenient for sharing. Thank you again for your support Florian.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.