gt.beta2
29th January 2009, 15:55
Hi,
Imagine i have a Dialog (myDialog) with 3 QLineEdit objects: lineEdit1, lineEdit2, lineEdit3. I am using QtDesiner so i have 4 files:
main.cpp
myDialog.h
myDialog.cpp
myDialog.ui
If i want to apply a red color to the background off all lineEdits in the application e use, in main.cpp the following:
app.setStyleSheet("QLineEdit { background-color: red }");
Now supose i want to apply other stylesheet color as the Dialog level. Where showld i place the code:
myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
?
Thanks
Imagine i have a Dialog (myDialog) with 3 QLineEdit objects: lineEdit1, lineEdit2, lineEdit3. I am using QtDesiner so i have 4 files:
main.cpp
myDialog.h
myDialog.cpp
myDialog.ui
If i want to apply a red color to the background off all lineEdits in the application e use, in main.cpp the following:
app.setStyleSheet("QLineEdit { background-color: red }");
Now supose i want to apply other stylesheet color as the Dialog level. Where showld i place the code:
myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
?
Thanks