Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
865 Topics 3.4k Posts
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    25 Views
    No one has replied
  • PySide2 QQmlApplicationEngine No Window

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    P
    Have you doublechecked how things should be run inside Maya? I suggest you try running the code as a standalone Python QT app first. For that, your code will need to also instantiate a QApplication object and then run the _exec method on it. That may actually be the reason why you're seeing nothing...
  • Treeview / QSortFilterProxyModel rendering problem..

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    K
    @JonB @SGaist Thanks for taking the time to reply. Sorry I've done a bad job of explaining.. The issue is not with the scanning or sorting at scan time. I'm using a QRunner thread which recursively scans the directory tree, then creates QStandardItem for each file/directory/symlink and puts them into a QStandardItemModel, which is associated with a QTreeView - The scanning and initial sorting (whilst scanning) work perfectly fine. Cnce scanning is complete, a user can use the column headers to change the sorting (i.e. via Name or Type), if I rely upon the default sorting, it causes the UI to freeze whilst the sort is processed. If I use a QSortFilterProxyModel, this freezing does not happen (UI remains interactive and sort is much quicker), but, the problem is, I'm getting the on-selection glitch that I showed above (if I scroll the tree or resize the window, it forces a redraw and fixes it self). I would provide the code.. but, it's a hell of a mess (this is not my day job, I'm just experimenting/playing in the evenings) I've come to the conclusion its a bug / anomaly as I've got the same issue with both PyQT5 and PySide2.. So think I'm going to put this to bed, and move onto something else.
  • RTTI requirement for PySide2

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    CristianMaureiraC
    I don't know if you opened this bug: https://bugreports.qt.io/browse/PYSIDE-819 but there is already a patch being reviewed related to a RTTI issue and WebEngine in PySide2, maybe we can continue the discussion there or maybe you can certainly open a new report
  • Qt and QtPy in one program

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    CristianMaureiraC
    I don't know if I got the question right, but the kind of interaction you describe could be possible by "extending" and existing Qt/C++ application to use Qt/Python code. Take a look at this example: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/scriptableapplication There, there is a Qt/C++ Window that shows some Python code which you can run and interact with the Qt/C++ object itself. Please be aware that many things need to be consider, and that you must handle the embedded Python and generate Python bindings for your Qt/C++ potion of code that you want to interact with. Another use-case which was based on that example, is the research that is currently on-going regarding extending QtCreator with Python: https://blog.qt.io/blog/2018/08/15/python-extensions/ I hope those cases are in the same direction as your question.
  • PYSIDE2 Style

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    CristianMaureiraC
    Yes, it's supported. You can take a look at the following example which passes the --style argument. http://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/declarative/textproperties/main.py
  • Problem running pyside2 example in Linux

    Unsolved
    2
    0 Votes
    2 Posts
    747 Views
    CristianMaureiraC
    Hello, do you have some logs related to the build process? It seems to me that there is a mismatch between Qt and PySide2 versions. Which version of Qt did you use? and which branch of PySide2?
  • Problems with installing pyside2 on linux

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    SGaistS
    What mistake was it ? It might be useful for other people having the same trouble as you.
  • Problem With JSON value type of data

    Solved
    3
    0 Votes
    3 Posts
    964 Views
    D
    Hi @sierdzio Thanks for the reply! The API already sends IDs in both formats: int (or double) and string. If that is the case I will use strings in my code. Thank you very much. Regards.
  • Draw the QPushButton on the widget embedded with libvlc - MacOS

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    From what's on the report, QtQuick would be a better choice for the UI in that case.
  • Dynamic locale change

    Unsolved
    2
    0 Votes
    2 Posts
    914 Views
    JonBJ
    @spanara I would assume you will have to do your steps --- how else would the button know to change its text? But with your "many widgets" you should not have to write code for each widget to handle this/update itself. You should be able to loop over all of them doing the updates in one go.
  • PYQT5 - Populating Model from Thread / Sorting large Tree advice

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    PyQt is a wrapper on top of Qt, what happens within the Qt classes is on the C++ side.
  • Passing arguments from PySide2 to QML.

    Unsolved
    2
    0 Votes
    2 Posts
    4k Views
    D
    @pleaseHelpSteve: What worked for me is using QStringModel as described here https://stackoverflow.com/questions/50609986/how-to-connect-python-and-qml-with-pyside2 (or here http://doc.qt.io/qt-5/qtquick-modelviewsdata-cppmodels.html)
  • QThread Freezes GUI

    Unsolved pyside2 qthread pyqt5
    2
    0 Votes
    2 Posts
    2k Views
    SGaistS
    Hi, Looks like there's some problem with the PySide 2 implementation. You should check the bug report system to see if it's something known. If not, please consider opening a new report providing your example and as much details as possible about your current setup.
  • Displaying numbers with QLCDNumber.display() with PyQt5

    Solved
    10
    0 Votes
    10 Posts
    8k Views
    SGaistS
    Since you're using conda, try installing the version that is provided through conda, that will make your environment more coherent.
  • Languist: how to dynamically switch language of all UI?

    Locked Unsolved
    2
    0 Votes
    2 Posts
    740 Views
    SGaistS
    Hi, Please don't post the same question in multiple sub-forum. One is enough. Duplicate Closing this one.
  • How to create a menu with mitil-pages by Pyside2

    Solved
    2
    0 Votes
    2 Posts
    717 Views
    Y
    My god... I thought I have a answer... just use this for each widgets I want to create... new_widget.show()
  • This topic is deleted!

    Locked Unsolved
    3
    0 Votes
    3 Posts
    5 Views
  • 0 Votes
    3 Posts
    1k Views
    SGaistS
    Hi, Just a wild guess but the dialog that you invoke triggers a local event loop that blocks the application flow until you’re done with it. That event loop now processes all the events, so there might be something regarding that.
  • Compiling PythonQt with Qt creator

    2
    0 Votes
    2 Posts
    5k Views
    R
    It is neccessary to run qmake (Build -> Run qmake) after every change, i could be environment variables or any qt project files like prf...