Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 456.8k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    3 Votes
    29 Posts
    34k Views
    A
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • QTextBrowser causing a program to crash

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    SGaistS
    @errxyz said in QTextBrowser causing a program to crash: hi, did you manage to solve the problem? I am writing a similar program, trying to make something like a read-only terminal out of QTextBrowser Hi and welcome to devnet, You should create a new topic describing the exact problem you are having, the code that triggers it, etc.
  • RichText: how to insert "icon from theme" ?

    Unsolved
    4
    0 Votes
    4 Posts
    685 Views
    KH-219DesignK
    Hopefully someone with more experience than I with "icon themes" can come and comment. Please, come one; come all 🙏 @dextermagnific Ok got it. Well in your case, I went and skimmed this file: https://github.com/qt/qtbase/blob/dev/src/gui/image/qiconloader.cpp In skimming the code, it appeared to me that the only platform-specific implementation is QIconCacheGtkReader. Thankfully (for my sanity), it appears that the docs confirm this: https://doc.qt.io/qt-6/qicon.html#themeName (quote: "Platform icon themes are only implemented on Freedesktop based systems at the moment") https://doc.qt.io/qt-6/qicon.html#fallbackThemeName (quote: "Platform fallback icon themes are only implemented on Freedesktop based systems at the moment") So that makes me wonder if you only need your planned icon-theme approach to work on Linux? Have you tried QIcon::fromTheme on Windows or Mac and were you happy with the results? (Keep in mind that I am still speaking as someone who has not used the "icon theme" feature of QWidgets even once. Please double-check my comments with added research because I don't want to lead anyone astray!) If you only need it to work on Linux, then you can probably just look at QIconCacheGtkReader and learn how the icon selection is done for Freedesktop. (note to readers: I acknowledge my sloppy language conflating Linux and Freedesktop.)
  • what should i do to disable the qDebug() method on the release version?

    Unsolved
    2
    0 Votes
    2 Posts
    260 Views
    JonBJ
    @nicker-player said in what should i do to disable the qDebug() method on the release version?: DEFINES += QT_NO_WARNNING_OUTPUT This is misspelled (you should always look things up and copy+paste not type, especially if English is not your native language), so if you are getting a warning it might be why? If there are qDebug() statements in Qt code rather than explicitly in your own, #define will make no difference. I do not know whether Qt's own Release libraries are are compiled with QT_NO_DEBUG_OUTPUT or not. Correct the spelling and see where that gets you.
  • QTextDocument + QML TextArea ideas for handling large content

    Unsolved qtextdocument textarea richtext
    2
    0 Votes
    2 Posts
    292 Views
    D
    I found marknote, I see that the performance is fine, but I don't understand why, the logic in general is very similar
  • This topic is deleted!

    Solved
    4
    0 Votes
    4 Posts
    348 Views
  • QtWebEngineWidgets not showing checkboxes properly

    Unsolved
    9
    0 Votes
    9 Posts
    780 Views
    T
    Thanks for that. Saved me a lot of time. Can I cross compile from source from Linux (Ubuntu) for Windows using $ configure -xplatform win32-msvc ... Would this compile a 32-bit version or a 64 bit version. There is no win64-msvc platform listed. In any event there is no need for the MSVC compiler to be 64 bit. The 32 bit compiler will work fine, right?
  • 0 Votes
    12 Posts
    838 Views
    J
    Alright! it's all working thank you very much for your help. I've got my app being distributed with both the wayland and xcb files. I'm copying both libQt6WaylandEglClientHwIntegration.so.6 and libQt6WaylandClient.so.6 into my core Qt\libs\ dir. as well as the wayland-decoration-client, wayland-graphics-integration-client and wayland-shell-integration dirs into my Qt folder too. I thin it was the missing integration folders that was causing me to have problems earlier on. Thanks for you help everyone, and hopefully this can assist someone in the future. James
  • Why do apps built with PySide6 have a more cramped menu bar than native KDE apps?

    Solved
    14
    0 Votes
    14 Posts
    846 Views
    J
    @dextermagnific Yes, I have realized that, but installing python3-pyside6 through dnf in fedora kde spin seem to cause it to not boot, and I'd have to update all packages from a hooked up tty for it to boot. I'm going to make a reproducer with this issue when I'm less busy and probably talk on the fedora forums to see what they've got to say about this.
  • 0 Votes
    5 Posts
    85 Views
    P
    @SGaist Hi, I remember I saw that LLVM issue but I didn't know how to interpret it and I thought it was fixed. However, I just put the static asserts below in the code and compilation failed in the CI using clang and libc++, while it succeeded in the rest using GCC and libstdc++. #include <compare> // Check if the types support three-way comparison static_assert(std::three_way_comparable<QString>, " ** QString - three-way comparison NOT supported"); static_assert(std::three_way_comparable<QDate>, " ** QDate - three-way comparison NOT supported"); static_assert(std::three_way_comparable<QTime>, " ** QTime - three-way comparison NOT supported"); // Check if the C++20 three-way comparison is available static_assert(__cpp_lib_three_way_comparison >= 201907L, " ** Three-way comparison library NOT available"); I don't know if you refer to qcompare.h and qcomparehelpers.h. I just looked at them and I found usage of __cpp_lib_three_way_comparison . So, most likely my problem is due to the libc++ issue in the link you mentioned.
  • 0 Votes
    5 Posts
    562 Views
    D
    @SGaist Thank you for replying! I found the problem. I had a problem importing VTK-related dependency libraries. After I re-imported the related libraries, the function returned to normal.✌️
  • Is there a simple way to make a triangle in Qt3D?

    Solved qt3d
    5
    0 Votes
    5 Posts
    615 Views
    Pl45m4P
    @Mitchal-Dichter said in Is there a simple way to make a triangle in Qt3D?: working directly with Direct3D, Metal, and Vulkan and skipping Qt Even though this is a Qt Forum here and Qt is in fact a great framework, sometimes you better look for something else. In your case, if you plan to render everything directly, you could also pick an immediate GUI, like ImGUI together with a Vulkan (on mac through MoltenVK), D3D or OpenGL backend. Fee free to post some updates on this or showcase your approach later :)
  • How to notify style change to apps ?

    Solved
    5
    0 Votes
    5 Posts
    559 Views
    D
    Thank you I'll go the inotify way. I just need to check that "commits" to the settings file are atomic so I won't be reading garbage (I read somewhere that QSettings handles well that).
  • How diff MousePress and shift/ctrl+MousePress?

    Solved
    2
    0 Votes
    2 Posts
    554 Views
    qazaq408Q
    i got it event->modifiers() & Qt::ShiftModifier
  • Unable to save PySide6 documentation

    Unsolved
    9
    0 Votes
    9 Posts
    873 Views
    C
    @SGaist Ya I've done plenty of digging over there. Maybe it helped because I finally did manage to make some progress (kind of). The ninja apidoc command now fails due to a number of exceptions like the one below. I couldn't come across any discussion of paths being misrepresented like this so I'm guessing I made a careless mistake somewhere - just not sure how to go about determining where exactly without a never ending trial/error. qt.shiboken.doc: (doc) While handling <snippet> in PySide6.QtXml.QDomNode, line 4: Failed to open file "\Qt\6.9.1\Src:C:\Users\Nicholas\Packages\BuildQt\pyside-setup\build\.venv\build\pyside6\doc\base\codesnippets:\Qt\6.9.1\Src\qtbase\src\xml\doc\snippets\code\src_xml_dom_qdom.py" for reading: The filename, directory name, or volume label syntax is incorrect.)
  • Getting application startup to call main()

    Unsolved
    12
    0 Votes
    12 Posts
    3k Views
    PerdrixP
    You may wish to download the source code for DeepSkyStacker 5.1.0 which was first released step in the journey from MFC to Qt (5.1.0 is a hybrid). You can DL the source code from here: https://github.com/deepskystacker/DSS/archive/refs/tags/5.1.0.zip. The file of interest is DeepSkyStacker\DeepSkyStacker.cpp HtH David
  • QT 5.15 Windows Crash on deallocation of QModelIndexList

    Solved windows 5.15.2
    4
    0 Votes
    4 Posts
    606 Views
    Axel SpoerlA
    @The-Force said in QT 5.15 Windows Crash on deallocation of QModelIndexList: __acrt_first_block == header ...usually points at out-of-bounds access. if (!list.empty() || ui->classList->model()->rowCount() == 0) ui->shipCombo->setCurrentIndex(list.first().row()); If list is empty and the model's row count is zero, list.first() causes a read out of bounds and is probably the reason for the crash. Something like if (!list.empty() && ui->classList->model()->rowCount() != 0) ui->shipCombo->setCurrentIndex(list.first().row()); ...would make more sense to me.
  • Qt6.9.1 qml demo: QPainter::begin: Paint device returned engine == 0, type: 3

    Unsolved
    3
    0 Votes
    3 Posts
    581 Views
    Q
    @SGaist 6.9.1 + vs2022
  • Not compilated Qt from sources

    Unsolved
    7
    0 Votes
    7 Posts
    720 Views
    JKSHJ
    @Navadvipa-Chandra-das said in Not compilated Qt from sources: failed because the system could not detect libzstd.dll ... Although the instructions for installing Qt do not mention the zlib library as required for installation! That's strange; I never needed libzstd or zlib to build Qt on Windows. Zstandard and zlib are optional components. If you don't have them, your config.summary file should contain something like this: Support enabled for: Using pkg-config ....................... no Using vcpkg ............................ no udev ................................... no OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ no OpenSSL 3.0 ............................ yes Using system zlib ...................... no Zstandard support ...................... no Thread support ......................... yes
  • 1 Votes
    3 Posts
    1k Views
    B
    @schrute What I found to be effective, is to leave it as a bordered window, and just intercept the WM_NCCALCSIZE message, so that it does nothing. This basically gives you a bordered window, where you stop windows from drawing the borders. This way, when you implement your own title bar, aero snap will still work.