Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Controlling cursor size in qt applications

    Unsolved
    1
    1 Votes
    1 Posts
    262 Views
    No one has replied
  • Sharing a QLatin1String across derived classes: static const vs. inline static const

    Unsolved
    5
    0 Votes
    5 Posts
    368 Views
    l3u_L
    Well okay, then I'll go for variant 2 – seems more logical to me to declare such a shared const variable right away instead of having to re-reference it inside the implementation. Thanks for the clarification :-)
  • Build a QT project in VSCode on macOS.

    Unsolved
    1
    0 Votes
    1 Posts
    585 Views
    No one has replied
  • Moc file

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    J
    if you just cp ABC to CBA it has no effect If you jump to moc file, then click to missing pushbutton function to go header then delete all functions which cause error its gone
  • Help Changing Format of TextEdit Without Replacing Contents

    Unsolved
    2
    0 Votes
    2 Posts
    187 Views
    C
    @CodermanBill wrote, "but nothing changed". You take some plain text, wrap it in HTML that does not attempt to style or otherwise format it, reinsert it into the editor, and expect something to change (I assume visually). What exactly are you expecting?
  • advice on debugging bus error

    Unsolved
    3
    0 Votes
    3 Posts
    831 Views
    A
    Thanks @Pl45m4 Ouch! I KNEW I shouldn't have upgraded yesterday, I didn't even want the Apple Intelligence crap. Yes, I see lots of similar posts now. I was trying to get all my widgets packed as tight as I can and I was adjusting the padding/margins/geometries of all the widgets but I just can't figure out how to get rid of the space above/below the 2 toolbars in this custom TabWidget I created. For me the crash is random, sometimes within seconds, other times up to a few minutes. [image: 8c007ffd-ec13-4e48-a4d3-2580c15a5406.png]
  • 0 Votes
    8 Posts
    710 Views
    C
    @Yihua-Liu Your application is trying to load a plugin from your deployment folder. This plugin is expecting a matching Qt version which, it seems you are saying is also in the deployment folder. When you ran ldd against the plugin the Qt libraries found for linking were the set in /opt/Qt. It is entirely possible that these are not the same Qt version. This would stop your plugin loading. To use the Qt libraries bundled with your application over any Qt library present elsewhere you should look at the wrapper script in Create Application Package.
  • QSqlDatabase: QMYSQL driver not loaded

    Unsolved
    20
    0 Votes
    20 Posts
    3k Views
    SGaistS
    If you go to the patch linked in the bug report, you'll see the exact path of the two files that have been modified in qtbase.
  • Optimizing the for-loop with std::find_if causes an unexpected crash during runtime.

    Unsolved
    10
    0 Votes
    10 Posts
    859 Views
    H
    Thank you very much for your guys. Best regards.
  • Qt Vulkan examples crash in WSL2

    Unsolved
    4
    0 Votes
    4 Posts
    443 Views
    M
    WSL details (wsl --version) WSL version: 2.3.26.0 Kernel version: 5.15.167.4-1 WSLg version: 1.0.65 MSRDC version: 1.2.5620 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.22631.4751
  • QPDF Render to QImage is giving me Transparent output QImage

    Unsolved qt 6.4 pdf qtpdf render bmp
    2
    0 Votes
    2 Posts
    405 Views
    C
    They are converted that way because they contain no background. After PDF v1.4 the resulting pixel on a page is the composition of all overlaying graphic objects, each of which may carry an alpha component. If there is no explicit opaque object (e.g. a white rectangle) overlaying the entire page, under all the other objects, then there is no background where there are no overlying objects. It could be that the "working" images are PDF v1.3 or have an explicit background layer. You could: adjust the PDFs at source, or paint the resulting image over a filled canvas image to obtain an image guaranteed to have a background
  • Qt and STM32 Sending and Receive Problem

    Unsolved
    2
    0 Votes
    2 Posts
    171 Views
    SGaistS
    Hi and welcome to devnet, Which version of Qt ? On which OS ? You should also connect the errorOccurred signal to ensure there's not something happening that you missed.
  • Looks like the SIGNAL loadFinished(bool) is not emitted anymore with Qt 6.8.1

    Solved
    67
    0 Votes
    67 Posts
    19k Views
    V
    Thank you!
  • qt.permissions: Could not find permission plugin for QLocationPermission.

    Unsolved
    1
    0 Votes
    1 Posts
    149 Views
    No one has replied
  • What is the last Qt 5 version that supports GCC 4.8 (using buildroot)?

    Unsolved
    3
    0 Votes
    3 Posts
    338 Views
    L
    @Pl45m4 older versions do support GCC 4, for example https://wiki.qt.io/Qt_5.10_Tools_and_Versions and https://wiki.qt.io/Qt_5.7_Tools_and_Versions I have 2 problems with the documentation. It does not mention the buildroot toolchain It is not clear which is the last version that is ok to use GCC 4 (4.8)
  • 0 Votes
    3 Posts
    410 Views
    Christian EhrlicherC
    ... or check inside the delegate functions if the row is still the one e.g. by checking the data to display.
  • Dock window scroll bar activate without clicking

    Unsolved
    6
    0 Votes
    6 Posts
    454 Views
    K
    @SarahBeth , What you did then? It was kept as limitation only or has some work around?
  • Undefined Reference Linker Error

    Solved
    6
    0 Votes
    6 Posts
    632 Views
    C
    Any descriptive name that is not explicitly reserved should be fair. So defaultColors or _defaultColors would be OK; _DefaultColors or __defaultColors would not. File-scoped variables can be declared static and become invisible outside the translation unit. Standard advice is to question the need for such variables and use an anonymous namespace instead of static: namespace { QList<QColor> defaultColors { Qt::blue, Qt::red, Qt::yellow, Qt::green, Qt::magenta, Qt::black, Qt::darkGray }; }; // rest of file can see defaultColors If your file-local color list is being populated in the constructor of a class then that strongly suggests it should be part of the class or initialised outside the class (as above). __rtrnClr in GetSeriesColor seems to have no need to exist. Are you sure the function needs a non-const reference return value and not just a QColor?
  • Cannot close application

    Unsolved
    4
    0 Votes
    4 Posts
    353 Views
    GaoboG
    the qt's document say that: If the event loop is not running, this function does nothing.
  • 0 Votes
    7 Posts
    2k Views
    A
    I'm having this same issue. I get the same $$magic$$ error as well. I tried passing a .stl hint to assimp importer, but that didn't work either. I have a lot of stl files included using qresources, so it would be a pain to migrate away, but it is feasible. I was using Qt3D before, but am trying to get away from it since it's being deprecated. Hoping someone here has some hints. const auto qrc = QResource{filePath.string().c_str()}; auto qfile = QFile{qrc.fileName()}; qfile.open(QIODeviceBase::OpenModeFlag::ReadOnly); auto data = std::vector<char>{}; data.resize(qfile.size()); qfile.read(data.data(), data.size()); const auto ret = importer.ReadFileFromMemory( reinterpret_cast<const void*>(data.data()), static_cast<std::size_t>(data.size()), aiProcess_Triangulate | aiProcess_JoinIdenticalVertices | aiProcess_FlipUVs); qWarning() << importer.GetErrorString(); return ret;