PDA

View Full Version : connection from button to slot with parameter of type QSqlDatabase*



herbstritter
16th March 2010, 13:12
Hi,

i want to connect a QPushButton to a slot create(QSqlDatabase *database), but i get the following:

QObject::connect: Incompatible sender/receiver arguments
QPushButton::clicked() --> CreateCupDialog::create(QSqlDatabase*)

Do i have to change my slot to create() because the button cant send a QSqlDatabase* type? how do i get my pointer passed to the functions executed in create()?

thanks for your help.

high_flyer
16th March 2010, 15:46
Where is the QSqlDatabase pointer that needs to be passed to create?
You could have a slot which takes no parameters, connect it to the button, and there call CreateCupDialog::create(QSqlDatabase*).