Como obter texto no QlineEdit quando QpushButton é pressionado em uma seqüência de caracteres?

Eu estou tentando implementar uma função. Meu código é dado abaixo.

Eu quero obter o texto em lineedit com o nome do objeto 'host' em uma string, digamos 'shost', quando o usuário clica no botão com o nome 'connect'. Como posso fazer isso? Eu tentei e falhei. Como eu implemento essa função?

import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *


class Form(QDialog):
    def __init__(self, parent=None):
        super(Form, self).__init__(parent)

        le = QLineEdit()
        le.setObjectName("host")
        le.setText("Host")
        pb = QPushButton()
        pb.setObjectName("connect")
        pb.setText("Connect") 
        layout.addWidget(le)
        layout.addWidget(pb)
        self.setLayout(layout)

        self.connect(pb, SIGNAL("clicked()"),self.button_click)

        self.setWindowTitle("Learning")

    def button_click(self):
    #i want the text in lineedit with objectname 
    #'host' in a string say 'shost'. when the user click 
    # the pushbutton with name connect.How do i do it?
    # I tried and failed. How to implement this function?




app = QApplication(sys.argv)
form = Form()
form.show()
app.exec_()

Agora, como implemento a função "button_click"? Acabei de começar com pyQt!

questionAnswers(2)

yourAnswerToTheQuestion