when I do this it works:
select ->setItemData(1, QColor(255, 175, 0), Qt::TextColorRole);
but I get a warning:
[ 11%] Building CXX object CMakeFiles/test.dir/modifcons.cpp.o...
Normally, you would use a class derived from QDialog for this purpose. There are many examples in the Qt distribution.
d_stranz Today, 16:19Sorry, I guess that is only used for setting custom data and not visual properties.
I think the only way to change the color of an individual entry in a combo box is the implement a custom...
the rest of the code
void ModifCons::saveCons()
{
qDebug() << "saveCons";
m_valid1 ->show();
m_valid2 ->hide();
Qt Centre is a community site devoted to programming in C++ using the Qt framework developed at The Qt Company.
If you have any problems with Qt or its usage, you can get help from the members of Qt community on our forum.
Don't forget to check out our links section for more Qt resources.
Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code.
Troubleshooting USB Communication with Qt and libusb for Embedded Device Recognition
17th March 2025 15:16 by Andrew23