in this case i am not running a wt example but it's my code.

________________________________
 From: Wim Dumon <w...@emweb.be>
To: Oto Magaldadze <omagalda...@yahoo.com>; 
witty-interest@lists.sourceforge.net 
Sent: Tuesday, April 24, 2012 5:27 PM
Subject: Re: [Wt-interest] No formatting and header row on WTableView
 
Did you deploy the 'resources' folder in your docroot?
Do you see any 404 (file not found) errors in your log?

Regards,
wim.

Op 24 april 2012 13:47 heeft Oto Magaldadze <omagalda...@yahoo.com>
het volgende geschreven:
> Here is my code:
>
>     view = new WTableView;
>     gridLayout = new WGridLayout;
>     int rows = 5;
>     int columns = 4;
>     model = new WStandardItemModel(rows, columns, this);
>     gridLayout->addWidget(view, 0,0);
>     root()->setLayout(gridLayout);
>     for (int row = 0; row < rows; ++row) {
>        for (int column = 0; column < columns; ++column) {
>          Wt::WStandardItem *item = new Wt::WStandardItem();
>          item->setText("Item " + boost::lexical_cast<std::string>(row)
>                        + ", " + boost::lexical_cast<std::string>(column));
>          model->setItem(row, column, item);
>        }
>      }
>     model->setHeaderData(0, Horizontal, std::string("Header 1"));
>     model->setHeaderData(1, Horizontal, std::string("Header 2"));
>     model->setHeaderData(2, Horizontal, std::string("Header 3"));
>     model->setHeaderData(3, Horizontal, std::string("Header 4"));
>     cout <<  boost::any_cast<std::string>(model->headerData(3, Horizontal))
> << endl; // ouput: Header 4 (works)
>     view->setAlternatingRowColors(true);
>     view->setModel(model);
>
> but no header row is visible and no formatting available (like alternating
> row colors).
> What am I doing wrong?
>
> Shot - http://redmine.emweb.be/attachments/742/wtableview.png
>
> Oto
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to