Single-use plastic bags will be banned in Queensland from July next year after the state parliament passed new legislation on Tuesday night.