emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp
changeset 48 10eaf342f539
parent 47 f83bd4ae1fe3
child 56 15bc1d5d6267
equal deleted inserted replaced
47:f83bd4ae1fe3 48:10eaf342f539
   344     QObjectList objectList;
   344     QObjectList objectList;
   345     objectList.append(this);
   345     objectList.append(this);
   346     loader.setObjectTree(objectList);
   346     loader.setObjectTree(objectList);
   347     QObjectList widgetlist = loader.load(FILE_PATH_DOCML, &loadingOk);
   347     QObjectList widgetlist = loader.load(FILE_PATH_DOCML, &loadingOk);
   348 
   348 
   349     int widgetCount = widgetlist.count();
   349     if(loadingOk){
   350     if(loadingOk && widgetCount){
       
   351         if(layout()){
   350         if(layout()){
   352             mLayout = dynamic_cast<QGraphicsGridLayout*>(layout());
   351             mLayout = dynamic_cast<QGraphicsGridLayout*>(layout());
   353             mLayout->setContentsMargins(0,0,0,0);
   352             mLayout->setContentsMargins(0,0,0,0);
   354         } else {
   353         } else {
   355             NM_ERROR(1,"NmAttachmentListWidget::constructUi: Widget doesn't have layout!");
   354             NM_ERROR(1,"NmAttachmentListWidget::constructUi: Widget doesn't have layout!");