Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
853 Topics 3.3k Posts
  • QJSEngine with QUILoader undefined ui childe bject

    Unsolved
    1
    0 Votes
    1 Posts
    307 Views
    No one has replied
  • 0 Votes
    4 Posts
    653 Views
    SGaistS

    Can you show the actual message you get ?

  • 0 Votes
    3 Posts
    431 Views
    D

    thank you for your reply
    Ok i will try this

  • Copy folder qt c ++

    Solved
    5
    0 Votes
    5 Posts
    9k Views
    J.HilkJ

    Since QDir & QDir::EntryList has some serious trouble with (MacOS) app-bundles, I ended up implementing the QDirIterator solution @Chris-Kawa suggested:

    void copyAndReplaceFolderContents(const QString &fromDir, const QString &toDir, bool copyAndRemove = false) { QDirIterator it(fromDir, QDirIterator::Subdirectories); QDir dir(fromDir); const int absSourcePathLength = dir.absoluteFilePath(fromDir).length(); while (it.hasNext()){ it.next(); const auto fileInfo = it.fileInfo(); if(!fileInfo.isHidden()) { //filters dot and dotdot const QString subPathStructure = fileInfo.absoluteFilePath().mid(absSourcePathLength); const QString constructedAbsolutePath = toDir + subPathStructure; if(fileInfo.isDir()){ //Create directory in target folder dir.mkpath(constructedAbsolutePath); } else if(fileInfo.isFile()) { //Copy File to target directory //Remove file at target location, if it exists, or QFile::copy will fail QFile::remove(constructedAbsolutePath); QFile::copy(fileInfo.absoluteFilePath(), constructedAbsolutePath); } } } if(copyAndRemove) dir.removeRecursively(); }
  • 0 Votes
    10 Posts
    1k Views
    eyllanescE

    @TenG XY Problem: https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem

  • 0 Votes
    4 Posts
    2k Views
    Cr0ssC

    Hi @SGaist, I took you advice and finally found out where the problem is.
    I looked into Wependency Walker and realized that I can import PySide6.QWidgets before I import wiggly, So that the dlls needed is already loaded for wiggly.
    I've been testing wiggly using one single import wiggly in IPython, not runing the main.py directly in the examples, trying to copy dlls from one place to another, and kept getting ImportErrors.
    Now I write:

    import PySide6.QtWidget import wiggly

    and it works.

    Thanks for your help!

  • 0 Votes
    2 Posts
    336 Views
    jeremy_kJ

    I'm under the impression that Visual C++ has disallowed inline assembly for x64 for a while.

    Quoting from https://docs.microsoft.com/en-us/cpp/assembler/inline/inline-assembler?view=msvc-160:
    Inline assembly is not supported on the ARM and x64 processors.

  • PyQt doesn't understand &

    Solved
    28
    0 Votes
    28 Posts
    9k Views
    SGaistS

    @Rodrigo-B hi and welcome to devnet,

    As already written, the accelerators are not permanently shown on Windows.

  • 0 Votes
    7 Posts
    2k Views
    S

    Because we had declarations of shortcuts littered all over the place we came up with the following solution to handle them in one place.

    We derived a class MyApplication from QApplication and overrode bool notify(QObject *receiver, QEvent *e) override. Within this function we checked e->type() == QEvent::Shortcut. Everything that couldn't be handled is then forwarded to QApplication::notify.

    We didn't override the Ctrl+C shortcut or anything similar. However, because this is so early in Qt's signal handling you could be lucky with this approach.

  • 0 Votes
    3 Posts
    438 Views
    guardG

    No, there are three monitors, and if I disconnect one of them, I get a signal, and if I plug it back in, I get a signal, but if I disconnect it again, I don't get a signal.

  • Troubles using pyuic5

    Solved
    9
    0 Votes
    9 Posts
    7k Views
    A

    UPDATE:
    I pip uninstalled/re-installed the following, and that solved my issue:
    PyQt5
    PyQt5-tools
    PyQt5-sip
    PyQtWebEngine

  • 0 Votes
    4 Posts
    2k Views
    A

    @Rguessford I would also be interested to get the Qt Creator Debug button to work for both, Python and QML debugging, at the same time. Even with QQmlDebuggingEnabler instantiated.
    I think, I'm stuck at the same as @Jeff-B-0

  • changing the application codec for all things

    Unsolved
    6
    0 Votes
    6 Posts
    894 Views
    C

    @aha_1980 Hi,

    I passed my string into QString constructor like this "QtextEdit->setText(Qstring().fromLocal8bit(mystring.c_str()); and my problem solved. I believe this is the only way I can work with.

    About QtJson I never tried actually. I searched for the top 5 cpp json parser and benchmarked every one of them. Rapidjson was the fastest. My log files are like 5 gb per file and if you think QtJson is faster I can try.

  • 0 Votes
    5 Posts
    3k Views
    R

    @sirius79 Did you get anywhere with this? :-)

  • VideoFrameProbed signal transfers empty frames

    Unsolved
    2
    0 Votes
    2 Posts
    373 Views
    SGaistS

    Hi and welcome to devnet,

    You are assuming that you have an image in QVideoFrame which might not be the case.

    See QVideoFrame::handleType.

  • 0 Votes
    8 Posts
    6k Views
    SGaistS

    Can you provide a minimal runnable example that shows your issue ?

  • Unattended install

    Moved Unsolved
    2
    0 Votes
    2 Posts
    433 Views
    SGaistS

    Hi and welcome to devnet,

    That's a question you should rather bring to the authors of the PyQt bindings.

  • QT Designer can't detect python

    Unsolved
    1
    0 Votes
    1 Posts
    498 Views
    No one has replied
  • 0 Votes
    5 Posts
    5k Views
    C

    Hay i saw your keyboard its really good, i also want to design this kind of keyboard, can you please tell me when i move the cursor on the keys it automatically enlarge. how is it possible ?

    and another one is, when i am typing it does not show anything but my only cursor move forward.

  • PyQt / Pyside2 commitment to Mac OS?

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    JKSHJ

    @jandyman said in PyQt / Pyside2 commitment to Mac OS?:

    I checked and app.setStyle('Fusion') also works, and it is much simpler.

    Great! Thanks for trying.

    I'll vote on the bug report

    Edit: I tried to go vote on the, but I cannot figure out how

    Go to https://bugreports.qt.io/browse/PYSIDE-695 Click "Log In" on the top-right corner of the page (You'll probably be taken to the home page after logging in) Navigate to https://bugreports.qt.io/browse/PYSIDE-695 again Click "Vote for this issue" on the middle-right of the page

    It would also be helpful to post a comment stating your versions of macOS + Python + Pyside, and letting the devs know that app.setStyle('Fusion') worked for you

    it wasn't at all difficult to run across this bug, which is why it surprised me in the first place.

    I'm just glad that it's also easy to work around the bug.