Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.1k Topics 454.6k Posts
QtWS25 Last Chance
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    3 Votes
    29 Posts
    29k 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.
  • Using qt for a commercial application on windows (LGPL)

    Unsolved
    72
    0 Votes
    72 Posts
    5k Views
    J
    Can anyone answer?
  • Qt algorithm benchmark app , weird result

    Unsolved
    4
    0 Votes
    4 Posts
    61 Views
    I
    @cronos4455 For start - it appears that you are using QElapsedTimer to measure algorithm execution time, and that is a poor choice for your use case. The main reason being that what it measures is elapsed wall clock time, which has the highest variance as it is the most sensitive to whatever else is happening on the system at the same time (it is very possible that during a good chunk of the elapsed time, your application is not even running - as pointed out by @Kent-Dorfman) If nothing else, what you should measure is elapsed user time - just the time the thread running the algorithm actually spent on-CPU executing application (and not kernel-level) code. To my knowledge Qt has no API for that, so you'll need to use OS API directly (e.g on Windows you'll use the GetThreadTimes API) or take a dependency on a C++ benchmarking library that has the requisite APIs. Note that even using user time will still have some noticeable variance - there are effects related to content of CPU cache lines and branch prediction misses (which are most visible in the first time the code runs). The best way to deal with it is to do each run multiple times (as much as required so the total running time is at least a few seconds) and take the average time for each input size - possibly without the first one or two repetitions of each run. By the law of large numbers - this will be much closer to the "true" run time.
  • Focus stealing progress dialog

    Unsolved
    5
    0 Votes
    5 Posts
    74 Views
    PerdrixP
    @SGaist Certainly: https://www.dropbox.com/scl/fo/yzyyeijwip3pil9poly4p/ALZGlamwAtpuC5NrqMfkTUg?rlkey=4r29ofptuf5zzqdia027av71s&dl=1 PS Removing autoDefault from the Cancel button changed nothing. PPS Same problem on both Windows and macOS PPPS If a shared debug session would help you will be welcome to connect to my system using e.g. Chrome Remote Desktop
  • Multiple QSqlTableModels on single widget

    Solved
    4
    0 Votes
    4 Posts
    83 Views
    Z
    Marking as solved since the actual question re: multithreading was answered by @Pl45m4 For those having similar issues with performance on views/mappers connected to QSqlDatabase the issue here (as suspected above) was related to my mapping and connections. Essentially an internal helper function to update subtotals was being called hundreds of times. This was causing significant delays on navigation through the model, as well as initialization of the widget.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • how to make a widget that could input the text then the text became the widget

    Unsolved
    6
    0 Votes
    6 Posts
    116 Views
    jeremy_kJ
    I interpreted the OP description as something along the lines of GitLab's search input, where free text that is recognized as a keyword is replaced with a label: [image: 826e5846-f1b4-4c7c-a66a-d8c6d7fc38ba.png]
  • In QT engine how to "Unable to create a debugging engine"?

    Unsolved
    23
    0 Votes
    23 Posts
    29k Views
    V
    [image: 65d3663b-913a-46ee-8dd8-cba729bb5fc6.jpg] Debugger not recognised issue.
  • how to bundle all the system dll and lib for my qt program?

    Unsolved
    7
    0 Votes
    7 Posts
    82 Views
    Paul ColbyP
    Hi @MonkeyBusiness, I want to know if qt provides ways to deploy all required dll and lib with my program? As others have said, the answer is yes. You can read more about it here: https://doc.qt.io/qt-6/windows-deployment.html Since you asked specifically about VCRUNTIME140.dll it's worth explaining a bit more. windeployqt will collect a few different things for you application (not an exhaustive list): the Qt libraries your application depends on (if they can be detected); the Qt plugins in your application depends on (if they can be detected); the VC runtime redistributable. Now, the VCRUNTIME140.dll you mentioned is part of that #3. Specifically, as I understand it, Microsoft does not allow applications to distribute and install VC runtimes in any way other than via their own .exe installer. So, windeployqt will pull the VC redist installer (typically vc_redist.x64.exe) from the OS, and put it with your application (unless you use the --no-compiler-runtime option to skip it). It is then your responsibility to run that installer, if the required runtime is not already installed, either manually, or as part of your own application installer. Here's a bit of how the Qt6 docs describe it: For Windows desktop applications, the required runtime files for the compiler are also copied to the deployable folder by default (unless the option --no-compiler-runtime is specified). In the case of release builds using Microsoft Visual C++, these consist of the Visual C++ Redistributable Packages, which are intended for recursive installation by the application's installer on the target machine. So, in summary: use windeployqt to collect the libraries, and runtime, needed for the app (tip: you might find --release and --compiler-runtime options helpful) distribute the resulting file set however you like (zip it, write a Qt Installer Framework installer, create an *.msi file, etc) when/after installing, run the included vc_redist.x64.exe - either manually, or via your own installer. There are other ways to do it (including commercial install tools etc), but that's the most basic way, as far as I understand it. Cheers.
  • QsortFilterProxyModel filter parents without visible children.

    Unsolved
    12
    0 Votes
    12 Posts
    127 Views
    P
    Because I would have thought you want that flag for the default case Ah, thank you, but in this specific case I would have wanted another type of recursion to happen : ) Suggestions go to https://bugreports.qt.io/. Thank you, I will try to provide as much info as possible and post the link here when it's done.
  • pyuic5 no longer converting files properly

    Solved
    3
    0 Votes
    3 Posts
    38 Views
    enjoysmathE
    @Kent-Dorfman I will update my code to PyQt6 since I'm doing a rewrite :)
  • Right click not working in form designer

    Unsolved
    13
    0 Votes
    13 Posts
    626 Views
    Z
    @MJ02 said in Right click not working in form designer: Please could I have some assistance I am trying to right click on a push button to get to the signals and slots menu but nothing happens when I right click Make sure you're in "Edit" mode in Qt Designer or Creator. If right-click isn't working, try using the Object Inspector or just hit Ctrl+Shift+S to open the signals/slots editor directly. Should do the trick!
  • Update UI from multiple threads

    Solved
    14
    0 Votes
    14 Posts
    151 Views
    A
    @Christian-Ehrlicher Okay, I finally saw the issue. In my code std::this_thread::sleep_for(std::chrono::milliseconds(100)); was outside the pool.enqueue() function. So the main thread was constantly sleeping and couldn't process the signals.
  • Windows compilation problem

    Unsolved
    2
    0 Votes
    2 Posts
    41 Views
    JonBJ
    @oliver_mpt said in Windows compilation problem: The function CreateSyntheticPointerDevice is declared in winuser.h as : I don't know but have a read through https://www.reddit.com/r/gcc/comments/u0q721/how_to_compile_a_shared_library_that_uses_types/ . That was from 3 years ago and said You'll need a very recent version of Mingw-w64. You'll also need to define NTDDI_VERSION to at least NTDDI_WIN10_RS5 Maybe the discussion there will help for this particular issue? Also https://discuss.kde.org/t/kirigami2-for-developement-on-windows-rant/6333/16. If the error comes from Qt sources rather than your own I do not know why it does not run through and compile/link correctly. I do not use Windows for Qt.
  • Qt 6.9.0 and debug information problem

    Unsolved
    7
    0 Votes
    7 Posts
    67 Views
    Z
    Sorry, I found it. I have last version 3.3.1 of "Qt Visual Studio Tools"
  • QTabWidget: how to implement MRU Ctrl+Tab switching ?

    Unsolved
    3
    0 Votes
    3 Posts
    70 Views
    A
    Need new class sub-classing QTabWidget MruTabWidget::MruTabWidget(QWidget *parent) : QTabWidget(parent) and installEventFilter
  • QSS for QTabBar close button: visible on selected OR hovered

    Unsolved
    2
    0 Votes
    2 Posts
    35 Views
    SGaistS
    Hi, I think that for this case, you should consider creating a QProxyStyle in order to be able to manage that hierarchy of constraints.
  • QApplication initialization is memory intensive

    Unsolved
    2
    0 Votes
    2 Posts
    76 Views
    Kent-DorfmanK
    The graphics image above is not enough information to even make an educated guess.
  • plugin cache problem

    Unsolved
    6
    0 Votes
    6 Posts
    404 Views
    L
    In windows cache is located in the registry
  • Can't get location from geocode()

    Unsolved
    10
    0 Votes
    10 Posts
    172 Views
    Pl45m4P
    @JonB said in Can't get location from geocode(): could OP simply not be getting any "response" to "request" sent? I don't know in what situation none of the three connected signals are fired... so I guess no. I also tried with invalid address data (city = "khjgfkg" and street = "bvxycvcj") and I still get the QGeoCodeReply::finished signal. With no valid lat/long but that doesn't matter in this case. Therefore I guess it's either mine "object lifetime" issue or your "blocked event loop". However for the latter I don't see any reason for this to happen, assuming OP's Winzer widget/object is working properly. So @msauer751 needs to check the code that is not visible to us for Qt design and C++ issues... and probably find the cause of this problem.