QLabel doesn’t get transparent background and editable text even so i did set the right flags
Hello
i have QLable that i panting in QStyledItemDelegate item .
in the constructor i define :
- pLabel_title->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse);
- pLabel_title->setStyleSheet("QLabel { background-color : transparent; }");
- pLabel_title->setGeometry(rect);
and in the paint method i set the text and the Lable position
- pLabel_title->setText(Title);
- pLabel_title->width(), pTextEdit_title->height());
- pLabel_title->render(&pixmap);
every thing is shown but the QLable background stay gray color ( the QStyledItemDelegate is gradient color)
and i can’t select or do any thing that the setTextInteractionFlags let me do .
i just see the text. what im doing wrong here ?
2 replies
Have you see the article QWidget Semi-transparent Background Color [developer.qt.nokia.com] ? It shows how to make a QWidget semi-transparent and might give you a hint.
You must log in to post a reply. Not a member yet? Register here!


