Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.1k 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.
  • QSoundeffect who has always worked, in the new version 6.9.2

    Unsolved
    4
    0 Votes
    4 Posts
    115 Views
    SGaistS
    Can you check which version of Qt is provided with your distribution ?
  • How to properly exit GUI (with QT Widgets) application

    Solved
    8
    0 Votes
    8 Posts
    146 Views
    SGaistS
    Hi, Out of curiosity, why do that in the closeEvent rather than the class destructor ?
  • Qt6 on Mac: setIcon on a QAction not working since 6.7.3

    Solved
    4
    0 Votes
    4 Posts
    55 Views
    Leo SchubertL
    @IgKh Thanks, I did find the release notes of Qt6.7.3 stating a2aa1f81a81 Determine Qt::AA_DontShowIconsInMenus default value based on platform The default value of Qt::AA_DontShowIconsInMenus is now determined based on the platform. On macOS icons will not show by default. To override, use QAction.iconVisibleInMenu for individual menu actions, or set Qt::AA_DontShowIconsInMenus to false. As it did change from 6.7.2->6.7.3 my assumption was that this was rather unintended ...Nevermind. issue solved. Thanks again!
  • 0 Votes
    2 Posts
    21 Views
    JKSHJ
    Hi, @Kamro and welcome! It is not a bug, the option was deliberately removed from Qt Creator. It is replaced by Qt Design Studio's CMake generator: https://doc.qt.io/qtdesignstudio/studio-exporting-for-c.html
  • the heob get the output .I dont understand how to fix the problem.

    Unsolved
    5
    0 Votes
    5 Posts
    43 Views
    JonBJ
    @jsulm Hmm, I wish the pageAction() description also referenced the top of the document! But fair enough, looks like the actions returned are already member of the web view. But have no idea then why "heob" says that line causes a leak, it wouldn't know, it's just a pointer not an allocation. valgrind at least only reports on blocks which are actually unfreed at exit time, don't know about heob. I wonder whether the OP is (not) allowing their whole QWebEngineView to be disposed before exit? I can only say that using valgrind on Linux I have never got a single "spurious"/"incorrect" leak report on a Qt program. (It is possible I have not tested with a QWebEngineView.)
  • Qt QpushButton Delete Icon

    Unsolved
    10
    0 Votes
    10 Posts
    70 Views
    S
    ok, Thank you for your response
  • QPainter::begin: Paint device returned engine == 0, type: 2

    15
    0 Votes
    15 Posts
    31k Views
    Alexander.SashnovA
    I know, it's a very long time, but still actual for me (just found this thread in Google). So, my suggestion would be to set your own message handler (using qInstallMessageHandler) and inside of this handler do something: if (msg.indexOf("QPainter::begin: Paint device returned engine") == 0) { ; // set breakpoint here! } And then see a back trace down to the line in your code that caused it.
  • The encrypt/decrypt string with QT 6. How?

    Unsolved
    7
    0 Votes
    7 Posts
    175 Views
    SGaistS
    @SimonSchroeder by default OpenSSL not linked it's dynamically loaded. At least for the pre-built packages.
  • 0 Votes
    3 Posts
    126 Views
    S
    The part about Qt using OpenSSL is a HUGE clusterfuck where Qt "gives you hints" about not being able to use OpenSSL. You'll see an error like "qt.network.ssl: QSslSocket::startServerEncryption: TLS initialization failed" On Windows you have to yourself figure out what is the OpenSSL version that Qt might work with, whee to get the binaries (building it is a HUGE PITA and requires tools such as NASM, and half the sources don't even build) and where to place the crypto and openssl DLL files. On Linux if you're using system packaged Qt it might just work out of the box (at least it has worked for me).
  • Qt Window positioning

    Unsolved
    5
    0 Votes
    5 Posts
    136 Views
    S
    @JKSH said in Qt Window positioning: @Pl45m4 said in Qt Window positioning: Are you using Linux with Wayland? This is an important question, because the Wayland protocol does not allow client windows to set their own positions. And X11 and Qt is so buggy that nothing works by default without doing a million timer hacks. I don't entirely blame Qt here, X11 with its async protocol is sketchy and causes a lot of headache.
  • what should i do to find the reason that the program makes the big memory.

    Unsolved
    2
    0 Votes
    2 Posts
    87 Views
    jsulmJ
    @nicker-player Use a memory monitoring tool like Valgrind (Linux) to see where in your app the most memory is allocated.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    39 Views
    No one has replied
  • 64-bit desktop applications double the memory

    Unsolved
    2
    0 Votes
    2 Posts
    100 Views
    Christian EhrlicherC
    How did you measure the memory needed by QLabel? For sure you need some more as all pointers are now 64bit wide bit this will for sure not double the needed memory footbprint.
  • 0 Votes
    3 Posts
    232 Views
    zybzybZ
    I rewrote the paintEvent with reference to the source code of Qt, most of which are the same as the official source code, but before drawing with QTextLayout::d raw, the selection range was restricted, and the line breaks in the selection were removed, which can already fulfill my needs, thank you!
  • HELP) Initialization issue with QList<QList<QLineSeries*>> m_seriess_2d

    Unsolved
    10
    0 Votes
    10 Posts
    118 Views
    Christian EhrlicherC
    It's for sure a double free - please provide a minimal, compilable example to reproduce the issue
  • Under what license are Qt's .tags files?

    Unsolved
    9
    1 Votes
    9 Posts
    282 Views
    P
    The licensing documentation also covers this. While it doesn't specifically address the metadata artifacts from QDoc, it states: Qt documentation is available under commercial licenses from The Qt Company, and under the terms of the GNU Free Documentation License (FDL) version 1.3, as published by the Free Software Foundation. That sets the precedent.
  • Qt::StringLiterals

    Solved
    4
    0 Votes
    4 Posts
    113 Views
    kkoehneK
    But there is a 50% performance increase anyway right? The exact overhead is not that easy to guess, as some other things come into play. First, even for u""_s, there is some constant overhead for constructing a QString object. And second, there is also other overhead, like looking up %1 ... But u""_g should always be faster than using just QString(const char*), as the latter needs to a) calculate the length of const char * by looking for the final NULL character, and b) convert UTF-8 to UTF-16. Mind you, these are very optimized operations, so the savings in a typical app aren't typically dramatic. But if you can avoid even some overhead by just using convenient API, why wouldn't you?
  • Cmake project configuration failed. Expert help please.

    Unsolved
    10
    0 Votes
    10 Posts
    144 Views
    M
    This is the ture device after deleting *.user file. but It gives error: can not reach the project directory. I changed the directory manually. I tried to build and gives another probems. Thanks
  • QSqlqueryModel with Mouse Move

    Unsolved
    5
    0 Votes
    5 Posts
    61 Views
    F
    Thank you