Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.6k Posts
  • QTableView (QHeaderView) sort indicator alignment

    Unsolved
    5
    0 Votes
    5 Posts
    182 Views
    P
    I also found a croppig problem each time a headerview style for an up-arrow or down-arrow has been set, it doesn't matter whether the style definition contains any attributes or not. Effect can be reproduced even by: QHeaderView::down-arrow { } Seems to be a bug in my eyes.
  • Impossible Generate Executable whit its dependecy

    Unsolved
    2
    0 Votes
    2 Posts
    42 Views
    SGaistS
    Hi, While 18 is large, it's not completely extraordinary (just take the Qt5 sources for an example of large qmake based project). However .pro files calling each other does not sound right. For "multi-projects" project, there is the subdirs template. I think you should check that as a starting point.
  • QApplication and NSApplication

    Solved
    3
    0 Votes
    3 Posts
    74 Views
    M
    Hi @IgKh, Thanks a lot for this comprehensive response, this is much clearer now. Regards
  • Not compilated Qt from sources

    Unsolved
    6
    0 Votes
    6 Posts
    131 Views
    N
    Hello, All! I added zstd-v1.5.7-win64.zip , downloaded from here https://github.com/facebook/zstd/releases Added to the PATH variable a string C:\Prg\zstd-v1.5.7-win64\dll This compilation error has already disappeared. But there is another mistake. Although the instructions for installing Qt do not mention the zlib library as required for installation! Примечание: включение файла: ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src\google/protobuf/port_def.inc Примечание: включение файла: ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src\google/protobuf/port_undef.inc Примечание: включение файла: ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src\google/protobuf/port_def.inc Примечание: включение файла: ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src\google/protobuf/port_undef.inc Примечание: включение файла: ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src\google/protobuf/port_def.inc Примечание: включение файла: ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src\google/protobuf/port_undef.inc [29/21935] ACTION //third_party/devtools-frontend/src/front_end/third_party/acorn:devtools_entrypoint-bundle-copy(/C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/target_toolchain:x64) [30/21935] ACTION //third_party/devtools-frontend/src/front_end/third_party/intl-messageformat:devtools_entrypoint-bundle-bundle(/C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/target_toolchain:x64) FAILED: gen/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/intl-messageformat.js C:/Prg/Python/Python313/python.exe ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/node/node.py ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/rollup/dist/bin/rollup --silent --config ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/rollup.config.js --input gen/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/intl-messageformat.prebundle.js --file gen/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/intl-messageformat.js Traceback (most recent call last): File "C:\QtSource\qt6\qtwebengine\src\3rdparty\chromium\third_party\node\node.py", line 62, in <module> RunNode(sys.argv[1:]) ~~~~~~~^^^^^^^^^^^^^^ File "C:\QtSource\qt6\qtwebengine\src\3rdparty\chromium\third_party\node\node.py", line 57, in RunNode raise RuntimeError('Command \'%s\' failed\n%s' % (' '.join(cmd), err)) RuntimeError: Command 'C:\Prg\nodejs\node.exe ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/rollup/dist/bin/rollup --silent --config ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/rollup.config.js --input gen/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/intl-messageformat.prebundle.js --file gen/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/intl-messageformat.js' failed Error: kill EPERM at ChildProcess.kill (node:internal/child_process:511:26) at ChildProcessWorker.forceExit (C:\QtSource\qt6\qtwebengine\src\3rdparty\chromium\third_party\devtools-frontend\src\node_modules\jest-worker\build\workers\ChildProcessWorker.js:307:17) at Timeout._onTimeout (C:\QtSource\qt6\qtwebengine\src\3rdparty\chromium\third_party\devtools-frontend\src\node_modules\jest-worker\build\base\BaseWorkerPool.js:188:16) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) [31/21935] ACTION //third_party/devtools-frontend/src/front_end/third_party/lit:devtools_entrypoint-bundle-bundle(/C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/target_toolchain:x64) [32/21935] ACTION //third_party/devtools-frontend/src/front_end/core/platform:platform(/C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/target_toolchain:x64) [33/21935] CXX obj/third_party/protobuf/protobuf_lite/coded_stream.obj Примечание: включение файла: ../../../../../../../qt6/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src\google/protobuf/io/coded_stream.h Примечание: включение файла: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\assert.h Примечание: включение файла: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\corecrt.h Примечание: включение файла: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xfacet Примечание: включение файла: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xlocinfo Примечание: включение файла: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\__msvc_xlocinfo_types.hpp Примечание: включение файла: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\clocale Примечание: включение файла: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\locale.h [37/21935] ACTION //third_party/devtools-frontend/src/front_end/generated:generated(/C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/target_toolchain:x64) ninja: build stopped: subcommand failed. [3208/13101] Building CXX object qtquick3d\src\runtimerender\CMakeFiles\Quick3DRuntimeRender.dir\resourcemanager\qssgrendershaderlibrarymanager.cpp.obj FAILED: qtwebengine/src/core/Release/AMD64/QtWebEngineCore.stamp qtwebengine/src/core/Release/AMD64/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp qtwebengine/src/core/Release/AMD64/QtWebEngineCore C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/Release/AMD64/QtWebEngineCore.stamp C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/Release/AMD64/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/Release/AMD64/QtWebEngineCore C:\Windows\system32\cmd.exe /C "cd /D C:\QtSource\ReleaseVS\Build\qtwebengine\src\core && C:\Prg\Ninja\ninja.exe -C C:/QtSource/ReleaseVS/Build/qtwebengine/src/core/Release/AMD64 QtWebEngineCore" [3210/13101] Automatic QML type registration for target QuickControls2Imagine [3211/13101] Building CXX object qtquick3d\src\runtimerender\CMakeFiles\Quick3DRuntimeRender.dir\extensionapi\qssgrenderextensions.cpp.obj [3212/13101] Building CXX object qtquick3d\src\runtimerender\CMakeFiles\Quick3DRuntimeRender.dir\extensionapi\qssgrenderhelpers.cpp.obj [3213/13101] Building CXX object qtquick3d\src\runtimerender\CMakeFiles\Quick3DRuntimeRender.dir\qssgdebugdrawsystem.cpp.obj [3214/13101] Building CXX object qtquick3d\src\runtimerender\CMakeFiles\Quick3DRuntimeRender.dir\resourcemanager\qssgrenderloadedtexture.cpp.obj [3215/13101] Building CXX object qtquick3d\src\runtimerender\CMakeFiles\Quick3DRuntimeRender.dir\resourcemanager\qssgrenderbuffermanager.cpp.obj [3216/13101] Building CXX object qtquick3d\src\runtimerender\CMakeFiles\Quick3DRuntimeRender.dir\rendererimpl\qssglightmapper.cpp.obj ninja: build stopped: subcommand failed. C:\QtSource\ReleaseVS\Build>rem cmake --build . --parallel 1 C:\QtSource\ReleaseVS\Build>cd C:/QtSource/ReleaseVS/Build C:\QtSource\ReleaseVS\Build>cmake --install . -- Install configuration: "Release" -- Installing: C:/QtSource/ReleaseVS/Lib/lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfig.cmake -- Installing: C:/QtSource/ReleaseVS/Lib/lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfigVersion.cmake -- Installing: C:/QtSource/ReleaseVS/Lib/lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfigVersionImpl.cmake -- Installing: C:/QtSource/ReleaseVS/Lib/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake -- Installing: C:/QtSource/ReleaseVS/Lib/lib/cmake/Qt6BuildInternals/QtStandaloneTestTemplateProject Thanks! Sincerely, Navadvipa Chandra das.
  • Disable DPI scaling in QT 6?

    Unsolved
    3
    2 Votes
    3 Posts
    186 Views
    M
    @martin_ky That's what I've been doing for the app I'm developing, can this cause any problems for non resizable apps?
  • Issue with WIndowStaysOnTopHint on Linux RHEL8 with X11 Display. Qt version 5.15.3.

    Unsolved
    2
    0 Votes
    2 Posts
    31 Views
    SGaistS
    Hi, From the doc of WindowStaysOnTopHint: Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly. Did you also set Qt::X11BypassWindowManagerHint ?
  • Installing CMake static target with QML module

    Unsolved
    2
    0 Votes
    2 Posts
    93 Views
    M
    Also facing the exact same issue.
  • 0 Votes
    3 Posts
    153 Views
    D
    are u solved now?
  • Using ASM (x86) with Qt on MacOS with CMake. How?

    Unsolved
    5
    0 Votes
    5 Posts
    136 Views
    JonBJ
    6502 assembly, simple, elegant :) Bit limited on memory though...
  • 0 Votes
    14 Posts
    246 Views
    M
    @Pl45m4 I'm too stupid to fix it myself, and like I said, no experience with C++ OOP, only with microcontrollers. Explain me this though, wouldn't QMovie and AnimatedImage be one of the most popular QObjects, since it allows you to use custom asset animations to create your own widgets with different states, for example here's one using a single .gif file for cursor hover/exit: [image: 2qoYcg0.gif] It's a lot easier to do stuff in animation programs, then to, for example, create a cavalier projection algorithm for Qt, to get this extrusion animation
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • How to get the geometry of the screen on which the app is started

    Unsolved
    2
    0 Votes
    2 Posts
    40 Views
    C
    Is QGuiApplication::primaryScreen() useful?
  • Quick Qt 6 Migration Question

    Solved
    4
    0 Votes
    4 Posts
    75 Views
    SGaistS
    You're welcome ! If that answers your question, please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so other forum users may know as well :-)
  • Sleep in QtScript

    10
    0 Votes
    10 Posts
    6k Views
    FlincoF
    I am returning to this old topic because I have a similar need. I use the Qt Installer Framework to install my Qt application written in C++. I should point out that with the Qt Installer Framework, you can create two types of installers: “online”, which downloads what it needs to install from a remote repository, and “offline”, which contains everything it needs. Offline installers have one drawback: they do not allow you to “update” from an older version to a newer one. As a result, if the software is already installed, you have to uninstall the previous version before installing a new one. At the moment, I cannot create an “online” installer (which would solve the problem), so I have come up with a workaround for the “offline” installer which, thanks to a Qt script, silently uninstalls the old version. Now, I need to insert a few seconds of “sleep” into the Qt script to give the uninstaller, which runs in the background, time to do its job. This is because users (including myself) are often a little too quick to move forward with the installation process and are told that “the destination folder is already in use” even though, when they try again a moment later, it is free and available for installation.
  • Migrating from MFC to Qt: How to install qtwinmigrate

    Unsolved
    6
    0 Votes
    6 Posts
    574 Views
    W
    After I deleted QWidget.*** from my test project now I am getting linker error like this. https://forum.qt.io/topic/137730/how-to-disable-linking-with-qt6entrypoint-in-qmake/6 But I do not know how to prevent QT qmake with QT Tools to remove the QT entrypoint. Do I have to add a qmake file to my project to set "CONFIG -= entrypoint"?
  • How to style QMenu right-arrow on hover using Qt Style Sheets?

    Unsolved
    3
    0 Votes
    3 Posts
    57 Views
    O
    @Pl45m4 Thanks—I totally forgot I had posted this before! I tried QMenu::right-arrow:hover but unfortunately it's still not working.
  • How to Style Hover on QMenu's Tear-off Area?

    Solved
    3
    0 Votes
    3 Posts
    189 Views
    O
    Sorry for the late reply—I actually forgot I had posted on the forum! I've now resolved the style sheet issue, and it's working as expected. Here's the snippet I used: QMenu::tearoff { background-color: #1A1A1A; height: 12px; border: none; background-image: url(linkIcons:menuLine2.png);} QMenu::tearoff:selected { background-color: #4D4D4D; height: 12px;} [image: 43160286-d023-4481-8714-1efa9398bf9e.png]
  • Page margin about QTextDocument

    Unsolved
    7
    0 Votes
    7 Posts
    577 Views
    C
    If you do not want the behaviour of QTextDocument::print() then do not use it. This is closer to your intent: #include <QPrinter> #include <QPrintDialog> #include <QTextDocument> #include <QApplication> #include <QPainter> int main(int argc, char *argv[]) { QApplication app(argc, argv); QTextDocument document; document.setHtml("<h1>Hello, World!</h1><p>This is a test document.</p>"); QPrinter printer; QPrintDialog printDialog(&printer); if (printDialog.exec() == QDialog::Accepted) { printer.setPageSize(QPageSize::A4); printer.setPageMargins(QMarginsF(0, 50, 10, 10), QPageLayout::Millimeter); QPainter p(&printer); document.drawContents(&p); p.end(); } return app.exec(); }
  • Add include directories from sub_directory to main application. How?

    Solved
    10
    0 Votes
    10 Posts
    201 Views
    B
    @Christian-Ehrlicher There were my bad. Always been developing when libraries inside of project tree and never been facing any troubles. Never been thinking that 'library-in-tree' is there common way or even requirement for CMake. For now started optimising developing process and environment because of huge amount duplicated-triplicated sources and got troubles when moved sources outside of the project tree. For now made everything clear for myself.
  • 0 Votes
    3 Posts
    148 Views
    B
    @semlanik no apologies needed, thanks for the reply (I’m late replying as been working on other tasks the past few weeks). I’ll get back onto this in the coming weeks and will take your advice and hopefully get a successful build. Once I have ill feedback and look to resolve the topic. Thanks