Berth allocation and quay crane assignment are two important problems in seaside operations. They are commonly integrated to support the plan. The first generates the berthing time, position and required quay crane. It can be taken as a 2D bin-packing problem with one-dimension resource constraint by quay cranes and variable length of operation time determined by quay crane numbers. The second plans the assignment of quay cranes to vessels whose layout is generated in the former problem. The interface is not clear in the literature. This paper builds an integer linear programming model of the quay crane assignment problem with the inputs: vessel time-space layout and quay crane requirements. The optimal assignment solution with minimal shifts of quay cranes is obtained with promising performance by commercial operational software package. It can be a part of the integral planning for berth allocation with quay crane assignment problem.