Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.1k Topics 454.8k Posts
QtWS25 Last Chance
  • how to change the dayDelegate for changing the image visible state?

    Unsolved
    1
    0 Votes
    1 Posts
    30 Views
    No one has replied
  • The window lags while resizing if there are too many checkboxes.

    Unsolved
    9
    0 Votes
    9 Posts
    231 Views
    3
    @Pl45m4 I do not update something else on resize and do not repaint manually somewhere (or so I think). Full code: QApplication app(argc, argv); QWidget window; window.setWindowTitle("Adobe Leftovers Remover"); window.resize(1000, 800); window.setFixedSize(window.size()); // Make the window non-resizable QVBoxLayout* mainLayout = new QVBoxLayout(&window); QTabWidget* tabs = new QTabWidget; // Cleanup Tab QWidget* cleanupTab = new QWidget; QVBoxLayout* cleanupLayout = new QVBoxLayout(cleanupTab); QHBoxLayout* groups = new QHBoxLayout; // Paths Group QGroupBox* pathsGroup = new QGroupBox("Paths"); QVBoxLayout* pathsLayout = new QVBoxLayout; QPushButton* selectAllPaths = new QPushButton("Select All Paths"); QPushButton* deselectAllPaths = new QPushButton("Deselect All Paths"); pathsLayout->addWidget(selectAllPaths); pathsLayout->addWidget(deselectAllPaths); QList<QCheckBox*> pathCheckboxes; for (const QString& s : paths) { auto cb = new QCheckBox(s); pathCheckboxes.append(cb); pathsLayout->addWidget(cb); } pathsLayout->addStretch(); pathsGroup->setLayout(pathsLayout); // Registry Keys Group QGroupBox* registryGroup = new QGroupBox("Registry Keys"); QVBoxLayout* registryLayout = new QVBoxLayout; QPushButton* selectAllRegistry = new QPushButton("Select All Keys"); QPushButton* deselectAllRegistry = new QPushButton("Deselect All Keys"); registryLayout->addWidget(selectAllRegistry); registryLayout->addWidget(deselectAllRegistry); QList<QCheckBox*> registryCheckboxes; for (const QString& s : registryKeys) { auto cb = new QCheckBox(s); registryCheckboxes.append(cb); registryLayout->addWidget(cb); } registryLayout->addStretch(); registryGroup->setLayout(registryLayout); groups->addWidget(pathsGroup); groups->addWidget(registryGroup); cleanupLayout->addLayout(groups); QPushButton* deleteButton = new QPushButton("Delete Selected"); cleanupLayout->addWidget(deleteButton); // Logs Tab QWidget* logsTab = new QWidget; QVBoxLayout* logsLayout = new QVBoxLayout(logsTab); QTextEdit* logView = new QTextEdit; logView->setReadOnly(true); logsLayout->addWidget(logView); tabs->addTab(cleanupTab, "Cleanup"); tabs->addTab(logsTab, "Logs"); // Progress Bar QProgressBar* progress = new QProgressBar; progress->setValue(0); mainLayout->addWidget(tabs); mainLayout->addWidget(progress);
  • car_interface.h missing from D-Bus Car Example

    Unsolved
    3
    0 Votes
    3 Posts
    79 Views
    Paul ColbyP
    So I think car_interface.h should be generated during building. Or more correctly, generated during CMake's generation of the build system, as documented here. @rcx11, have you run CMake on the remotecontrolledcar directory?
  • Visual Studio 17.13.6 Qt cleanup not working

    Unsolved
    1
    0 Votes
    1 Posts
    32 Views
    No one has replied
  • how to define a macro function with included the signals key words?

    Unsolved
    8
    0 Votes
    8 Posts
    171 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
    22 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
    175 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
    111 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.
  • Qt panel in ROS has wrong behavior with collapsible sections with newer version

    Unsolved
    7
    0 Votes
    7 Posts
    78 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.
  • How to insert an item at a specific index of QListWidget?

    Solved qlistwidget insert order
    3
    0 Votes
    3 Posts
    66 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.
  • Qt algorithm benchmark app , weird result

    Solved
    9
    0 Votes
    9 Posts
    191 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
    58 Views
    S
    qmlRegisterSingletonType<MySingleton>("com.example.singleton", 1, 0, "MySingleton", mySingletonProvider);
  • The performance of customized widget is very different in another VS .sln

    Unsolved
    1
    0 Votes
    1 Posts
    29 Views
    No one has replied
  • Making Unicode BiDi Control Characters visible in QTextEdit

    Solved
    5
    0 Votes
    5 Posts
    412 Views
    I
    For some closure for anyone else interested, approach #2 (custom font) was made possible in Qt 6.9 with QTextOption::ShowDefaultIgnorables flag.
  • Right click not working in form designer

    Unsolved
    14
    0 Votes
    14 Posts
    716 Views
    D
    @MJ02 Hi, this just happened to me as well, I had spent 2-3h looking into the problem, I was literally going insane, reinstalling everything, etc. Your comment here was a life saver! I would not have thought of it.. So... Have a very good day!!!
  • Wayland and fractional screen scaling reported as integer by wayland-info and (Q)Screen

    Unsolved
    4
    0 Votes
    4 Posts
    297 Views
    C
    hi @aran , I have the same problem, have you found a solution? thank you!