Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
865 Topics 3.4k Posts
  • Qt and cmake issue

    Unsolved
    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Compiling static Fortran library Qt

    Unsolved
    10
    0 Votes
    10 Posts
    3k Views
    kshegunovK
    Guess that this is caused by the set flags. I don't know. Can I include that somehow as I know it optimizes the code more? Fortran uses C-linkage so any linker should be able to manage it. Note that fortran mandates decoration of the function names itself, because reasons. So if you have: subroutine dummy() end subroutine dummy This is seen by the linker as if it was defined as void dummy_(). If you intend to call fortran from C, you must provide the proper declarations for the compiler in your C code, they can't be deduced automatically. When I use either gfortran or ifort in my code and I'll try to do the cross compilation. Will the fortran part of the code run flawlessly on Mac or Linux? As long as you configure the compiler properly, you can treat fortran code as any other C code, so it should work fine, yes. Tangent: gfortran, I believe, still transpiles the fortran source to C and then runs the C compiler on top of it. In the end why should anyone invest time into keeping a real compiler for a zombie language up to date ...
  • Qt GUI with Eclipse c++

    Unsolved
    11
    0 Votes
    11 Posts
    3k Views
    SGaistS
    I'd recommend reading the Qt5 version: https://doc.qt.io/qt-5/signalsandslots.html @GastonMelo You really should take the time to go through Qt's documentation. It's full of tutorials, getting started guides and it also explains all the core concepts provided within the framework.
  • Shiboken - Building bindings with headers in subfolders

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    SGaistS
    Hi, Thanks for the feedback ! Can you post the link to said patch ?
  • Using QImageCleanupFunction with PySide2

    Unsolved
    2
    0 Votes
    2 Posts
    821 Views
    SGaistS
    Hi, Good question. What does your function look like ?
  • PyQt5: Invisible items in a QML ListView (perhaps a bug?)

    6
    0 Votes
    6 Posts
    4k Views
    V
    @JonB Thanks
  • QDateTimeAxis not shown in QChartView

    Unsolved
    1
    0 Votes
    1 Posts
    594 Views
    No one has replied
  • Python/PyQt/PySide - How to add an argument to derived class's constructor

    Solved
    6
    0 Votes
    6 Posts
    4k Views
    JonBJ
    Just to close this up. Although I posted this question here, to the the PyQt mailing list and on stackoverflow, since I never got an actual answer as to how to write the derived class's constructor to accept the new positional argument while retaining all the existing overloads, in the end I have actually gone for a named argument: class JListWidgetItem(QtWidgets.QListWidgetItem): def __init__(self, *args, value: typing.Any=None, **kwargs): super().__init__(*args, **kwargs) # optional `value` member, passed in as `value=...`, stored in data(Qt.UserRole) # this is a common thing to want, cf. `QComboBox.itemData()` if value is not None: self.setValue(value) and caller goes e.g. JListWidgetItem("text", value=1). Some people have said this is the more "pythonic" way, who knows, but at least it works! Thanks to all.
  • 0 Votes
    4 Posts
    2k Views
    SGaistS
    The first thing you should do is to make Worker inherit both QObject and QRunnable. QObject must come first. Making it a separated class and calling signals on it is wrong. Signals should be emitted from within the class that defines them. Another thing is that you don't set your worker to auto delete so you will end up eating lots of memories depending on how many times plot is called.
  • Web Assembly and decalarative-camera example.

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    raven-worxR
    @Julian-Guarin-0 said in Web Assembly and decalarative-camera example.: So I guess you are right. Does this confirm what you did see? as i said, i didnt see anything ;) But the configure clearly shows that you might only be possible to play sound files, i don't know if thats really true though for QtWebAssembly.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Pyside QLineEdit entering data from right-to-left

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    J
    @aha_1980 said in Pyside QLineEdit entering data from right-to-left: @Joel-Graff your example does not look like valid float number. Do you need exponential format? I'm not sure, if QDoubleSpinbox provides that, otherwise it would be first choice for that task. For the line edit, you could use input masks or hook up an own 'correction function' on every key press. It is, in fact, a valid float. It's called a "station" where 1 station = 100 feet. Thus 999 feet = 9.99 stations, which is commonly annotated 9+99. It's really just a length. The example I gave is actually the input mask I'm using - sorry for the confusion. The problem is, the input mask doesn't really fill out the required placeholders correctly. That is, if I create an input mask that reads: '00009+99.00;_' I would expect it to show ____0+00.__ as a default. Of course, it doesn't, and I admit, I don't really know much about input masks in Qt. Since I can't rely on the input mask to control the data entry, forcing it to enter data from the right (and push the characters to the left) seems the next best option. It's a fairly common data entry technique - I've seen it even in very old terminal-based systems. I was hoping I didn't have to craft my own callback to manage it. Thanks anyway. :)
  • Qt compatibility with VHDL source codes??

    14
    0 Votes
    14 Posts
    6k Views
    RochusR
    @aha_1980 thanks. They can add it to the gallery if they like, but the plugin is still work in progress.
  • QIODevice::read (QProcess): device not open

    Solved
    19
    0 Votes
    19 Posts
    11k Views
    F
    **My first problem has been resolved, so I will close this, and open a topic for my new problem. For future people who come to this topic : The solution for "Device not open" was to use "start function" instead of "execute function". Thank you people for helping me.**
  • What's the state of perl bindings for Qt5

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    SGaistS
    Did you also check this https://cgit.kde.org/perlqt.git ?
  • How to install and use pyqt5

    Unsolved
    4
    0 Votes
    4 Posts
    3k Views
    E
    @aidanikuz please watch following video to install and use pyqt5 https://www.youtube.com/watch?v=yqHiOesB-nI
  • Garbled when compiling JAVA

    Unsolved
    3
    0 Votes
    3 Posts
    1k 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
    8k 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
    926 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
    963 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.