[Interest] QWidgetTextControl

Igor Mironchik igor.mironchik at gmail.com
Fri Jul 1 12:55:01 CEST 2016


Hi.

This happens in two lines of code:

m_form->updateDocItemInMap( elem->document(), elem );

QObject::connect( elem->document(),
   &QTextDocument::undoCommandAdded,
   m_form, &Form::undoCommandInTextAdded );

where elem is QGraphicsTextItem...

first elem->document() return 0x89d050 and second those broken pointer.

updateDocItemInMap() is:

void
Form::updateDocItemInMap( QObject * doc, FormText * text )
{
     d->m_docs[ doc ] = text;
}

where d->m_docs is:

//! Map of text documents.
QMap< QObject*, FormText* > m_docs;

What's wrong?

On 01.07.2016 13:39, Igor Mironchik wrote:
> Hi.
>
> I'm debugging strange behavior of QGraphicsTextItem. In:
>
> QTextDocument *QWidgetTextControl::document() const
> {
>     Q_D(const QWidgetTextControl);
>     return d->doc;
> }
>
> d->doc is
>
> 0x-76b71fba74b7928c
>
> What is can be? Thank you.




More information about the Interest mailing list