Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
850 Topics 3.3k Posts
  • Garbled when compiling JAVA

    Unsolved
    3
    0 Votes
    3 Posts
    790 Views
    A

    yes.
    I guess it might be encoding problem . I set the UTF8 encoding in the options,but it didn't solve the problem.
    Platform:
    QT version :Android for armeabi-v7a (GCC 4.9, Qt 5.9.3 for Android armv7)
    OS: windows 10
    Qtcreator version: 4.7.2
    Compilers: Android gcc arm-4.9, JDK1.8
    Thanks.

  • Use Qt for gui frontend for Java jar

    Unsolved
    8
    0 Votes
    8 Posts
    7k Views
    A

    @blue34 I haven't tried grpc before. It uses protocol buffers though which I have used and aren't a bad way of doing things.

    I've never much cared for RPC mechanisms but whatever is easy for you to get implemented in the C++ side and the Java side is a decent way to do things. :)

    Like I said I always go the other way... native c++ library with the front end in java (android) and ios (objc). I've been trying out djinni for that lately and it makes the jni and what not nice and easy. Wrong direction though so that won't help you out much.

  • Can C functions send data to QT Slots in QT5.7 ?

    Unsolved
    3
    0 Votes
    3 Posts
    758 Views
    aha_1980A

    @vivekyuvan

    As @sierdzio already said, you cannot directly call C++ from C, and therefore you cannot use Qt.. But it is possible to write a wrapper, like discussed here: https://stackoverflow.com/questions/3583353/calling-c-class-member-function-from-c-code

    From within the C++ class, you can access all kind of Qt stuff again.

  • Slots execution order and catching menu/action clicks

    Unsolved
    2
    0 Votes
    2 Posts
    762 Views
    sierdzioS

    I can't explain difference between case 2) and 3).

    However, what you see in 1) is that signal-slot connections are always executed in order in which connections were made (hint: don't depend on this, though). So, when you connect in your plugin, you always do it after main program already had connected it's signals and slots - and thus your slots are executed after main program's, too.

    Then in 3) you get immediate execution because (probably) there was no connection made in main program for that particular triggered() signal - you are first in queue.

    Why 2) and 3) show different behaviour - I don't know.

  • 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
    1k 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
    878 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
    602 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
    750 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.

  • 0 Votes
    4 Posts
    950 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
    768 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.

  • 0 Votes
    4 Posts
    945 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
    3k 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
    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
    6k 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
    634 Views
    SGaistS

    Hi,

    Please don't post the same question in multiple sub-forum. One is enough.

    Duplicate

    Closing this one.