Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
84.1k Topics 460.3k Posts
Qt 6.11 is out! See what's new in the release blog
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    4 Votes
    29 Posts
    55k 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.
  • Launch telnet from Qt GUI application

    Unsolved
    18
    0 Votes
    18 Posts
    964 Views
    JonBJ
    @Emma-2000 Is that not exactly what I wrote above at https://forum.qt.io/post/839250 ?
  • QFilehandle required for client-server text app.

    Solved
    13
    0 Votes
    13 Posts
    308 Views
    JonBJ
    @stefbon said in QFilehandle required for client-server text app.: Every paragrap has it's own record in a database, so it's easy to achieve the desired locking: everyone can edit (=write to ) a paragraph, unless someone else is already doing that. And inserting, changing and deleting a paragraph is easy to maintain by a server. It's not going to be as simple as that in your real-world situation. You are describing pessimistic locking. You are going to require each user to do something before they can edit or delete a paragraph to "lock" it. What are you going to do if the locker then goes to lunch, or never returns? Having a pessimistic lock held for a long time is a pita. Alternative is optimistic locking. No "blocking" lock held. You save state of paragraph when user starts to edit. When ready to submit changes you make it UPDATE ... SET paragraph = new_paragraph WHERE paragraph = old_paragraph. This ensures update is committed only when nobody else has changed paragraph while you were editing. Often better for sharing. But you still have to deal with what to do if someone else has changed it while you were editing. Usual is to throw away new change and make user redo from newly changed paragraph state. Not so bad for "little records", not so good for "paragraphs". Then you have inserts. Between two existing paragraphs you & I each decide we want to insert our own new paragraph. There is nothing to lock or compare. Which order do you place these two paragraphs after we each submit? Perhaps "first (based on submit time) submitter's paragraph is inserted and then second submitter's paragraph is inserted after first one" (or other way round). But maybe first inserter's paragraph has to go before the old paragraph after it and second inserter's paragraph has to go after the old paragraph which was before it. they are now the wrong way round. And a whole host of other similars. It's one thing handling contention on small rows/columns, it's another on documents. Not to mention stuff like your interface may have to "push" changes from one user into another user's session while they are middle of doing something/their own editing. I foresee many problems....
  • WebEngineCore crashes always

    Unsolved web webengine webenginecore help crash app
    9
    0 Votes
    9 Posts
    208 Views
    Joe von HabsburgJ
    @Nils-Sjoberg thats work normally. I always use it for release windeployqt.exe C:\Users\B\Desktop\Projects\MyApp\build\MyApp\ worked : (windeployqt6.exe C:\Users\B\Desktop\Projects\MyApp\build\MyApp\MyApp.exe) What is the different windeployqt.exe and windeployqt6.exe ? also windeployqt.exe --webenginecore C:\Users\B\Desktop\Projects\MyApp\build\MyApp\ //or windeployqt.exe --webenginewidgets C:\Users\B\Desktop\Projects\MyApp\build\MyApp\ working
  • QMenuBar QAction MenuRole for "View / Enter Full Screen" menu item

    Unsolved
    2
    0 Votes
    2 Posts
    85 Views
    Nils SjobergN
    You must add a menu item to the View yourself, via a short Objective-C++ code, with the action selector toggleFullScreen: and the keyboard shortcut you want — once AppKit detects that such an item already exists, it will not add the automatic item with Fn+F and will honor your shortcut instead.
  • 0 Votes
    8 Posts
    2k Views
    Christian EhrlicherC
    Since all is calculated from HSV and V is 0, the behavior is correct.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    7
    0 Votes
    7 Posts
    211 Views
  • This topic is deleted!

    Unsolved
    0
    0 Votes
    0 Posts
    21 Views
    No one has replied
  • Zxing-Cpp android compile error

    Unsolved
    2
    0 Votes
    2 Posts
    174 Views
    SGaistS
    Hi, What exactly are you compiling ? The original zxing is java only currently but there's a cpp port and also a Qt port. Therefore, please post more details and even better a minimal sample project that allows people to reproduce your issue.
  • This topic is deleted!

    Unsolved
    0
    0 Votes
    0 Posts
    99 Views
    No one has replied
  • QSqlQuery not found.

    Solved
    2
    0 Votes
    2 Posts
    228 Views
    Christian EhrlicherC
    When you want to use a class you also have to make sure the header and libraries are correctly found and linked in. On every Qt class documentation page you can find what you have to do for this to happen. See https://doc.qt.io/qt-6/qsqlquery.html Header: #include <QSqlQuery> CMake: find_package(Qt6 REQUIRED COMPONENTS Sql) target_link_libraries(mytarget PRIVATE Qt6::Sql) qmake: QT += sql So depending on if you need qmake or cmake you have to add the commands above to your pro-file or CMakeLists.txt
  • qt creator bug : list of widgets in ui not updated in cpp code

    Unsolved
    2
    0 Votes
    2 Posts
    136 Views
    Pl45m4P
    @Mr323 Hi and welcome, you need to make sure that you re-run the uic tool in your build. The user interface compiler translates your *.ui file into usable C++ headers https://doc.qt.io/qt-6/uic.html It should run automatically if you have the AUTOUIC CMake property set, which should be the default when you create new projects via QtCreator's project wizard. https://cmake.org/cmake/help/latest/prop_tgt/AUTOUIC.html Edit: Also, if your correct name is indeed in your header file, but won't be recognized in your code through ui->something, it's a code model / IntelliSense issue, which might take some time until it's updated. Just because it's not directly changed in the code model, it does not mean that the updated code will not compile. Might happens from time to time.
  • Freezing issue caused by socket and UI updates in the thread and main thread

    Unsolved
    4
    0 Votes
    4 Posts
    354 Views
    SGaistS
    Sorry for the confusion, I misread the UdpSocket content. That said, how many times per second are you triggering an update to your graph ? Did you check the Qwt Oscilloscope example ?
  • DragHandler::onDragChanged not reporting continously

    Solved
    7
    0 Votes
    7 Posts
    646 Views
    K
    Set your acceptedButtons: https://doc.qt.io/qt-6/qml-qtquick-draghandler.html#acceptedButtons-prop So, with this, should I have a different DragHandler for every possible button I want to accept, and emit different signals? That seems like spaghetti code. Is there a way to pass which button is being pressed while the drag is happening? Something along the lines of: DragHandler { onDragChanged: { parentWidget.onDragChangedCallback(event, buttonPressed) } } Where buttonPressed may be the Right Mouse Button, the Left Mouse Button, or Middle Mouse Button. Now I'm also using onCentroidChanged and passing centroid.position. However, that only provides 1 position (the current position). Do I need to manually register the initial position? Or is there a way, like in onDragChanged, where I can pull the initial and last positions? It seems like onDragChanged is only being called when the drag is finished.
  • ZXing compiling error

    Solved
    3
    0 Votes
    3 Posts
    300 Views
    A
    I solved the problem by adding #include "moc_ZXingQt.cpp" to the end of the cpp file, but thanks anyway :)
  • QsciScintilla lexer not working

    Unsolved
    3
    0 Votes
    3 Posts
    134 Views
    T
    @Nils-Sjoberg Alright, changed that, but it unfortunately did not change much.
  • Getting CMake's FetchContent_Declare to pull from specific branch

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    Nils SjobergN
    The simplest: install the missing tinyxml2 dependency and stay with the master branch (instead of struggling with warnings-as-errors in the still unstable openmath branch), or alternatively disable "warnings as errors" specifically for the MicroTeX target if openmath is required.
  • Build Qt5.15.18 for address sanitizer

    Unsolved
    2
    0 Votes
    2 Posts
    128 Views
    Nils SjobergN
    Check that the flags (-fsanitize=address) also reach the linker and that the runtime is dynamic (/MD), try to isolate whether the problem is in QtWebEngine or the underlying qtbase, and make sure they are set before configure with a full distclean if necessary.
  • Modern App Packaging

    Unsolved
    9
    0 Votes
    9 Posts
    493 Views
    S
    @Paul-Colby said in Modern App Packaging: Using one of my open source projects as an example, the steps are roughly as follows: That is a great overview. I would upvote more than once if I could! @Paul-Colby said in Modern App Packaging: except instead of producing a Windows *.exe installer, I produce a "portable app" - which is a single archive (you can just unzip it), containing everything the app needs to runs For years we had problems with DLLs on Windows (which was before I got to work at this company and before they/we used Qt). The problem is when users want to switch out the executable, but developers might have slightly incompatible Qt versions on their machines. That is one big reason why we chose to compile Qt statically ourselves (and also using static Windows runtime). With 3rd party libraries it is sometimes hard to convince them to link against the static Windows runtime as well, but it is certainly worth it. The main software is just a single executable without any DLL dependencies. We do need some config files in specific directories. These we just put into the exectuable as well and check on startup if they exist and copy them to the right folder if necessary. For some users a portable app inside a ZIP file is still too complicated because they wouldn't know where to put it. I'm still playing with the idea to not just copy config files to the correct folder, but also to have an install button inside the app itself which will automatically copy it into "Program Files" directory, put it into the start menu and maybe register file extensions. This is so much easier with macOS or with AppImages/xdg on Linux. I believe this is how apps should work on Windows as well–no extra installer. I wish there would be something like AppImages for Windows as well (then I would be willing to use DLLs again). @Paul-Colby said in Modern App Packaging: Locally, I just use the OS-provided versions of GCC and Clang on the latest LTS (work) and non-LTS (personal) Ubuntu. Isn't there some requirement for linuxdeploy that you cannot use the most recent version of the OS (in order to provide the best backwards compatility across most distros)? Or is there a specific switch to override this? I couldn't see anything from your linked CMake files. Or were you just lucky so far?