27.03.2014, 12:28, "igor.mironc...@gmail.com" <igor.mironc...@gmail.com>: > Hi. > > I’m working on TextEdit widget for QtMWidgets library. > > TextEdit is a subclass of ScrollArea that derived from AbstractScrollArea. > AbstractScrollArea is implemented like QAbstractScrollArea and has viewport > as child widget. > > In TextEdit’s paintEvent I want to draw directly on viewport. And I > initialize QPainter with: > > QPainter p( viewport() ); > > But I receive folowing warning: > > QWidget::paintEngine: Should no longer be called > > QPainter::begin: Paint device returned engine == 0, type: 1 > > QPainter::setPen: Painter not active > > and nothing draws. > > What am I doing wrong?
One does not simply paint on the other widget. -- Regards, Konstantin _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest