Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
853 Topics 3.3k Posts
  • I want to good tutorial or book on PyQt

    Unsolved
    7
    0 Votes
    7 Posts
    7k Views
    M

    I just published a PyQt5 book:

    PyQt5 book

    Even Phil Thompson, the creator of PyQt, read it and says it's "very good". It saves you a lot of time when learning PyQt. It's the resource I wish I had had when I was getting started.

  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    100 Views
  • 0 Votes
    1 Posts
    451 Views
    No one has replied
  • how can I join and run a program when starting application?

    Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    JonBJ

    @Nathan-Miguel

    As I said/suspevted:

    You show us the code of your Qt application, which does not create the file, so it does not help.

    Nowhere do you you show whatever code does create the file, so since we cannot see that we cannot advise what it is you need to do.

    I wrote above:

    Are you now talking about what the current directory will be for the main.exe you run from your Qt program (perhaps because it creates systeminfo.txt without specifying a path)??

    but you didn't reply to that. If you want help, you'll need to provide information.

  • how can I use c ++ not qt QUICK / QML?

    Solved
    5
    0 Votes
    5 Posts
    973 Views
    N

    @sierdzio said in how can I use c ++ not qt QUICK / QML?:

    engine.rootContext()->setContextProperty("cpuname", &CpuName);

    its works tnks

  • How to I get cpu description and cpu name

    Solved
    7
    0 Votes
    7 Posts
    4k Views
    SGaistS

    Something like lspci -vnn | grep VGA ?

  • 0 Votes
    5 Posts
    1k Views
    Nikhilesh NN

    @SGaist Thank you, Samuel. I will definetely try it out.
    Marking this topic as solved.

  • 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
    2k 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
    1k 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
    663 Views
    SGaistS

    Hi,

    Good question. What does your function look like ?

  • 0 Votes
    6 Posts
    3k Views
    V

    @JonB Thanks

  • QDateTimeAxis not shown in QChartView

    Unsolved
    1
    0 Votes
    1 Posts
    527 Views
    No one has replied
  • 0 Votes
    6 Posts
    3k 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
    1k 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
    877 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
    5k Views
    RochusR

    @aha_1980 thanks.
    They can add it to the gallery if they like, but the plugin is still work in progress.