Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.0k Posts
  • Qt6 on Mac: setIcon on a QAction not working since 6.7.3

    Solved
    4
    0 Votes
    4 Posts
    210 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
    146 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
    184 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
    240 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
    300 Views
    SGaistS
    @SimonSchroeder by default OpenSSL not linked it's dynamically loaded. At least for the pre-built packages.
  • 0 Votes
    3 Posts
    250 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).
  • what should i do to find the reason that the program makes the big memory.

    Unsolved
    2
    0 Votes
    2 Posts
    182 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
    196 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
    307 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
    234 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
    449 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
    178 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
    266 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
    99 Views
    F
    Thank you
  • Expanding image in a QScrollArea

    Unsolved
    5
    0 Votes
    5 Posts
    181 Views
    M
    @Pl45m4 said in Expanding image in a QScrollArea: You are using QScrollArea wrong. A QScrollArea should not have a layout. Generally you set one widget to it, which you want to scroll. This widget can have a layout with multiple sub-widgets, but not the QScrollArea ifself This should be easy to fix if that's the case. I'll separate my content widget containing text and the image. Will that help me though? In what way is the "right" way better?
  • Direct2D Rendering Engine...

    Solved
    6
    0 Votes
    6 Posts
    280 Views
    A
    Thanks to the info above I shall be marking this as resolved. However, a further issue has revealed itself for which I shall be raising a new topic. For reference, I am using Visual Studio Tools (so it's "qmake" underneath). The Qt Project Settings in the relevant project file need to be amended as per the following screenshot: [image: 7cda28ac-eeef-4ded-b6fa-cb4635192382.png] I turns out I won't be raising a new Topic on my follow-up issue because there is already a bug report for it... Win32: the Direct2D platform plugin is totally broken when DPI is not 100%
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Building Qt with QT_DISABLE_DEPRECATED_UP_TO set fails

    Unsolved
    17
    0 Votes
    17 Posts
    680 Views
    Christian EhrlicherC
    configure --help: You can pass CMake variables as configure arguments: configure VAR=value which is equivalent to configure -- -DVAR=value