[Ctk-developers] Problems ctkErrorLogWidget and ctkErrorLogModel

Javier Mazaira javier.mazaira at alma3d.com
Wed Jan 29 03:06:50 EST 2014


Hi,

I need some help using ctkErrorLogWidget, I just want to create a function
to add and remove entries from this widget, but it's being really hard.
This is what I've got:


*ctkErrorLogWidget*  logWindow = new ctkErrorLogWidget();*
*ctkErrorLogModel model;*

// here I've created some test entries

*model.addEntry( QDateTime(), QString("threadid"), level,
QString("origin"), QString("text"));*
*model.addEntry( QDateTime(), QString("threadida"), level,
QString("origina"), QString("texta"));*
*model.addEntry( QDateTime(), QString("threadidb"), level,
QString("originb"), QString("textb"));*
*model.addEntry( QDateTime(), QString("threadidc"), level,
QString("originc"), QString("textc"));*

*// here I set model as errorlogmodel of my logWindow*
*logWindow->setErrorLogModel( &model );*


*QObject::connect(logAction,SIGNAL(triggered()),logWindow,SLOT(show()));*

so after signal "triggered" is launched, logwindow is showed in the screen
but I don't see any entry. I thought that I just need to add
a ctkErrorLogModel in my ctkErrorLogWidget to have a way to add entries on
this widget, but it doesn't works, I hope someone can helps me.

Thanks for all,
Javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20140129/b74d7b8a/attachment.html>


More information about the Ctk-developers mailing list