I found this in the documentation
void QAbstractButton::click () [slot]
Performs a click.
All the usual signals associated with a click are emitted as appropriate. If the button is checkable, the state of the button is toggled.
This function does nothing if the button is disabled.
so went back to my non-detigner program for button click.
connect( pb5, SIGNAL( clicked() ), this, SLOT( slotPb5() ) );
connect( pb5, SIGNAL( clicked() ), this, SLOT( slotPb5() ) );
To copy to clipboard, switch view to plain text mode
Then went to the implementation
void dlgMain::slotPb5()
{
if( pb5->text() == "~" ) return;
emit setButtonActionList( 5, "5" );
void dlgMain::slotPb5()
{
QStringList temp;
QString k;
if( pb5->text() == "~" ) return;
emit setButtonActionList( 5, "5" );
To copy to clipboard, switch view to plain text mode
so why not in designer? In the "Signnl Slot Editor" i have:
" pb5 clicked Pb5 click() "
and in my program I have
#include <QtGui>
#include "pmform.h"
{
ui.setupUi(this);
ui.leZone->setText("leZone");
}
void PmForm::Pb5()
{
ui.leZone->setText("This is what I want");
}
#include <QtGui>
#include "pmform.h"
PmForm::PmForm(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
ui.leZone->setText("leZone");
}
void PmForm::Pb5()
{
ui.leZone->setText("This is what I want");
}
To copy to clipboard, switch view to plain text mode
it compiles ok, but when I run it and click on the "Pb5" button I get
pete@peteBox:~/Desktop/PM-designer/pm$ ./pm
Segmentation fault
pete@peteBox:~/Desktop/PM-designer/pm$
At least I am getting a connection form inside designer to my "pmform.cpp"
Now, how do I get rid of the segmentation fault?
Thanks, Help would be most appreciatei.
Bookmarks