@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);
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?
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
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.
@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.
@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.
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 :)
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.
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.
@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.
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.
@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!!!