QPlainTextEdit segmentation fault

Posted by Alexander on Stack Overflow See other posts from Stack Overflow or by Alexander
Published on 2010-04-05T09:59:26Z Indexed on 2010/04/05 10:03 UTC
Read the original article Hit count: 337

Filed under:
|

Hi, All!

I have some Qt application with QPlainTextEdit in Tab widget. When try to make a pointer on it

QPlainTextEdit *w = (QPlainTextEdit*)ui->tabWidget->widget(0)

and call a document() method

w->document()

I get a segfault.

But if i call document directly, e.g. ui->mainEdit->document(), then everything works fine.

Can anybody explain me why it happens?

© Stack Overflow or respective owner

Related posts about qt

Related posts about segmentation-fault