usermodel->setData(usermodel->index(i,0),usl[i].userId());
usermodel->setData(usermodel->index(i,1),usl[i].description());
}
- usertable->resizeColumnToContents(0);
- usertable->resizeColumnToContents(1);
+ usertable->resizeColumnsToContents();
}
void MOverview::newUser()
if(thisHost==hsl[i].hostId())
foundThis=true;
}
- hosttable->resizeColumnToContents(0);
- hosttable->resizeColumnToContents(1);
+ hosttable->resizeColumnsToContents();
thishostbutton->setEnabled(!foundThis && req->hasRole("addhost"));
}
cartmodel->setData(cartmodel->index(cr,0),id,Qt::UserRole);
cartmodel->setData(cartmodel->index(cr,1),eventmodel->data(eventmodel->index(ilst[0].row(),1)));
cartmodel->setData(cartmodel->index(cr,2),eventmodel->data(eventmodel->index(ilst[0].row(),0)));
- carttable->resizeColumnToContents(0);
- carttable->resizeColumnToContents(1);
- carttable->resizeColumnToContents(2);
+ carttable->resizeColumnsToContents();
}
void MOverview::initCart()
vl->addWidget(tv=new QTableView,10);
tv->setModel(eventmodel);
tv->setEditTriggers(QAbstractItemView::NoEditTriggers);
- tv->resizeColumnToContents(0);
- tv->resizeColumnToContents(1);
+ tv->resizeColumnsToContents();
vl->addSpacing(15);
vl->addLayout(hl=new QHBoxLayout,0);
hl->addStretch(10);
cartmodel->setData(cartmodel->index(cr,0),id,Qt::UserRole);
cartmodel->setData(cartmodel->index(cr,1),eventmodel->data(eventmodel->index(idx.row(),1)));
cartmodel->setData(cartmodel->index(cr,2),eventmodel->data(eventmodel->index(idx.row(),0)));
- carttable->resizeColumnToContents(0);
- carttable->resizeColumnToContents(1);
- carttable->resizeColumnToContents(2);
+ carttable->resizeColumnsToContents();
}
}
ordermodel->setData(ordermodel->index(cl,3),cust[j].name());
cl++;
}
+ ordertable->resizeColumnsToContents();
}
void MOverview::orderDetails()