Пример #1
0
QWidget *PlayerCardDialog::createHandcardButton(){
    QCommandLinkButton *button = new QCommandLinkButton(tr("Handcard"));
    int num = player->getHandcardNum();
    if(num == 0){
        button->setDescription(tr("This guy has no any hand cards"));
        button->setEnabled(false);
    }else{
        button->setDescription(tr("This guy has %1 hand card(s)").arg(num));

        mapper->setMapping(button, -1);
        connect(button, SIGNAL(clicked()), mapper, SLOT(map()));
    }

    return button;
}