android - How to remove selected date rectangle in QCalendarWidget and small icons in widgets -
I am writing the implementation of my own QCalendarWidget, I have to select dates, but I do not want to see the default selection rectangle . It looks like:
and my code:
In Producer: setSelectionMode (single selection); Zero ShiftCalendar :: paintCell (QPainter * painter, const QRect and amp; rect, const QDate and date) const {if (date == selectedDate ()) {fillCell (painter, rect, CalendarWidget :: cellFillColor); } DrawCellText (painter, rect, quastering :: number (date.day ()), color); } Zero ShiftCalendar :: fillCell (QPainter * illustrator, const QRect & amp; rect, const QColor & amp; color) const {painter- & gt; Save (); Painter- & gt; SetRenderHint (QPainter :: Antialiasing); Painter- & gt; SetPen (QPen (color)); Painter- & gt; SetBrush (QBrush (color)); Painter- & gt; Drill Eclipse (FRact.center), Rect.Wide () / 2, Rect.Hight () / 2); Painter- & gt; resumed (); } What can I do?
The second problem, as seen in the picture are the pushbutton icon and the small size of the comb boxx icon.
Edit the first problem with the selection-background-color: rgba (0, 0, 0, 0) has been solved by adding. ; The second is still not resolved in the widget's stylesheet.
QAbstractItemView * view = findChild & lt; QAbstractItemView * & gt; (); If (see) {see-> SetItemDelegate (// times QItemDelegate and Override Paint Event); }
Comments
Post a Comment