Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.1k Topics 454.7k 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.
  • The window lags while resizing if there are too many checkboxes.

    Unsolved
    8
    0 Votes
    8 Posts
    94 Views
    Kent-DorfmanK
    I'm gonna speak in generalities here...the widgets in a Qt application form a tree structure where they have children and usually a single parent widget. When you change an entity in the tree, all of its children need to be updated as well, so the closer you are to the trunk, the more background processing it requires. All Qt programmers need to keep this in mind and subjectively manage their UI design to balance functionality with processing overhead. I think you need to work out some UI strategies to minimize the overhead of large scale child widget updates in your design. There are some experimental things to try but that's on you: horiz and vert scroll panel as parent of checkbox list custom widget design get rid of checkbox list in favor of a scrollable/collapsable tree-view add "submit" button to checkbox list and no doing any checkbox processing until the button is pressed
  • car_interface.h missing from D-Bus Car Example

    Unsolved
    2
    0 Votes
    2 Posts
    17 Views
    B
    I know nothing about dbus. But since this is in the CMakeLists.txt: qt_add_dbus_interface(controller_SRCS ../common/car.xml car_interface ) So I think car_interface.h should be generated during building.
  • how to define a macro function with included the signals key words?

    Unsolved
    8
    0 Votes
    8 Posts
    137 Views
    nicker playerN
    @jsulm thanks.you just helped me.
  • MacOS file open dialogue shows "Date-Added" which is always empty.

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Building QT6.5 with NMake error

    Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    KH-219DesignK
    As expected, it was easy to make a very small CMake project to reproduce the error (building "with" Qt, as opposed to "building Qt" the whole framework). The small project reproduces the qt6qml_debug_metatypes.json nmake "illegal value" error (invalid empty json file). There is good news, just as @Christian-Ehrlicher alluded to. It reproduces easily in 6.5.3, but the problem is gone when I use 6.7.3. So if anyone arrives here (as I did) due to a 6.5.3-based Qt project and is looking for a simple fix, the simple fix appears to be: upgrade to at least 6.7.3. The repro: https://github.com/219-design/qt-qml-project-template-with-ci/pull/120 The fix: https://github.com/219-design/qt-qml-project-template-with-ci/pull/121
  • Create QPrinter is very slow under Qt5

    Unsolved qprinter qelapsedtimer qt5.5 qt4.8.7 slow
    7
    0 Votes
    7 Posts
    3k Views
    K
    I know it's been a few years, but I was getting this because I had a defunct network printer in Windows. Removing the offending printer from Windows Printers settings fixed the problem for me.
  • How to use setData() in model with a back-end database

    Solved model-view sql database
    8
    0 Votes
    8 Posts
    139 Views
    SavizS
    @Redman Is the dataChanged() signal the primary reason elements are updated in the model? If so, I can likely skip overriding setData() and instead create a custom method that emits dataChanged() with the appropriate role name and index, triggered when the operation succeeds via a signal and slot.
  • Is there a way to use the windows version of the built-in icons in linux?

    Solved
    4
    0 Votes
    4 Posts
    97 Views
    I
    @james-b-s You mean the stuff that's get returned from QStyle::standardIcon? It is platform theme specific. From a cursory look in the source code, the icons on Windows are collected from various Win32 APIs, but most of them seem to be in the resource fork of shell32.dll (and other system DLLs). I guess you could extract them from there, but I doubt the Windows EULA allows re-distribution of them. If consistency between platforms is important, best bet is to choose a suitable licensed open source (or commercial) icon set and bundle it with your application.
  • Using qt for a commercial application on windows (LGPL)

    Unsolved
    73
    0 Votes
    73 Posts
    5k Views
    A
    @JKSH said in Using qt for a commercial application on windows (LGPL): The most comprehensive and useful presentation that I know on this topic is one from Burkhard Stubert, entitled "Making Qt Systems Comply To LGPL Version 3" https://www.youtube.com/watch?v=bwTlCBbB3RY It also mentions a few cases towards the end where companies did not comply properly at first. In that vein, Burhard's blog post on the Qt license might be relevant here: https://burkhardstubert.substack.com/p/do-not-sign-the-qt-license-agreement
  • Qt panel in ROS has wrong behavior with collapsible sections with newer version

    Unsolved
    7
    0 Votes
    7 Posts
    51 Views
    X
    It is true that I drag a vertical layout onto the tab. Maybe I can try to add a Widget into the tab rather than the layout and configure the Widget as a Vertical layout as you suggested but within the tab, not the tab itself. No worries! I appreciate the effort and thanks for your time :)
  • 0 Votes
    9 Posts
    1k Views
    M
    It seems that it helps, if in the Run option "Run as root user" is selected. It is annoying to type the password each time, the app is started but at least it works.
  • Focus stealing progress dialog

    Unsolved
    7
    0 Votes
    7 Posts
    154 Views
    PerdrixP
    I thought that I had sent you enough to build it - with judicious removal of pch,h and adding includes for Qt and stdlib stuff.
  • It is posible to update a QTablewidget row by row?

    Unsolved
    3
    0 Votes
    3 Posts
    39 Views
    JonBJ
    @electric-dev As @jsulm has said there ought be no problem. If you are not seeing updates that sounds like you might be blocking the Qt event loop? Do you perchance have code like while waitForAndGetAnIPNumberUntilNoMore() updateTableWidget(); ? That kind of approach, which we see from beginners, won't work as it does not allow event loop to be re-entered and hence the update to be shown. Instead you would see all updates in one go when the while loop finally exits.
  • How to insert an item at a specific index of QListWidget?

    Solved qlistwidget insert order
    3
    0 Votes
    3 Posts
    61 Views
    S
    Thank you for pointing this out! I would have never figured it out that passing a parent widget to QListWidgetItem would automatically add it to the list.
  • Animating the scale of a QDialog

    Unsolved
    2
    0 Votes
    2 Posts
    40 Views
    Pl45m4P
    @Mizmas What if you pick the geometry property instead of scale? I don't think you need the QGraphicsView for that
  • Qt algorithm benchmark app , weird result

    Solved
    9
    0 Votes
    9 Posts
    187 Views
    C
    @JonB I managed to solve it, It was a problem with QSet, function ,,insert'' took a lot of time event though I used ,,reserve''. I didn't have this problem in my console app because I used stl containers.
  • No CMake configuration for build type "Debug" found for sample projects

    Unsolved
    5
    0 Votes
    5 Posts
    4k Views
    B
    Hi @passiflora Have you found a solution yet? I had the same issue. Turns out CMake can sometimes have issues when there are spaces in directory names, especially in paths like the build directory. CMake and other build systems like Make or Ninja often have problems parsing paths with spaces in them, as the tools may interpret the space as a separator between different arguments. For example, a path like C:/My Qt Projects/build can cause problems because the build system might treat My and Qt as separate arguments instead of a single directory name. And this is exactly how my Build folder was named. I had to change it by removing the spaces. I changed the name of the build folder to My_Qt_Projects, and voila!! No more issues.
  • how to resister a singleton instance of a class for the qmlRegisterSingletonType?

    Unsolved
    3
    0 Votes
    3 Posts
    56 Views
    S
    qmlRegisterSingletonType<MySingleton>("com.example.singleton", 1, 0, "MySingleton", mySingletonProvider);
  • QDataWidgetMapper with SQL Table AUTO_INCREMENT

    Unsolved
    3
    0 Votes
    3 Posts
    56 Views
    JonBJ
    @ZNohre said in QDataWidgetMapper with SQL Table AUTO_INCREMENT: Edit: PS I had tried connecting the ID field to a QLabel in the hopes it would be read only. When QDataWidgetMapper submits though it looks like it's still pulling the text in the label to submit back to the database. It is submitting the value of an auto-incrementing ID in, say, an INSERT statement generated from a QDataWidgetMapper? Although I have not used this myself, did you set the generated flag on the column/field in the model? void QSqlRecord::setGenerated(QAnyStringView name, bool generated) Sets the generated flag for the field called name to generated. If the field does not exist, nothing happens. Only fields that have generated set to true are included in the SQL that is generated by QSqlQueryModel for example. I would hope that QDataWidgetMapper would respect that?