[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    connect not working in QDialog ?
From:       Jürgen_Hochwald <kde () cfjh ! de>
Date:       2005-05-31 21:50:38
Message-ID: 200505312350.38158.kde () cfjh ! de
[Download RAW message or body]

Hi

I'am trying to connect some Button's clicked signal to slots, but it seems, 
that is not workung, when the window is derived from QDialog. 

tSynopWin::tSynopWin(QWidget* parent, const char *name, bool modal)
 : QDialog(parent, name, modal)
{
...
  QPushButton *OkBtn = new QPushButton("Ok", this, "OkBtn");
  OkBtn->setGeometry(width()-200,height()-40,80,30);
  connect(OkBtn, SIGNAL(clicked()), this, SLOT(OkBtnClick()));
...
void tSynopWin::OkBtnClick() {
  debug("ok");
  //accept();
}

When I open the dialog, I get the following errors:

QObject::connect: No such slot QDialog::OkBtnClick()
QObject::connect:  (sender name:   'OkBtn')
QObject::connect:  (receiver name: 'SynopWin')

Put I the same code on the main window (of type KMainWindow) it works.

I havn't any idea, what is wrong.

Is it impossibe to connect somthing in a qdialog ? How can I do this instead ?

Jürgen
www.wetterstation-porta.info
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic