kamlmish
13th December 2010, 09:41
Hi
I have a button created in mainwindow and I connect the button "clicked " signal to the slot.
But I think Theres issue in the connection , thats the reason the slot is not called for the same
MainWindow::MainWindow()
{
//window specs
setWindowTitle(tr("GALLERY"));
resize(1350,1700);
//Allocation of items
settTree = new SettingsTree(this);
settTree->setGeometry(10,10,250,420);
listwidget = new QListWidget(this);
grid_button = new QPushButton(this);
grid_button->setGeometry(39,670,31,22);
list_button = new QPushButton(this);
addbutton = new QPushButton(this);
deletebutton = new QPushButton(this);
objectbutton = new QPushButton(this);
pf = new PanelFrame(this);
m_CheckBox = new QCheckBox(this);
m_CheckBox->setGeometry(230,14,21,21);
state = Qt::Unchecked;
m_Slider = new QSlider(Qt::Horizontal,this);
m_Slider->setGeometry(160,672,101,21);
//previewpane
/* previewpane = new QStandardItemModel(8,3,this);
setupmodel();
setupview();
*/
//functions to be called
Menu();
//connections:signal & slots
connect(list_button,SIGNAL(clicked()),this,SLOT(li stdisplay()),Qt::DirectConnection);
connect(m_CheckBox,SIGNAL(stateChanged(int)),this, SLOT(isMainWindowDocked()),Qt::AutoConnection);
connect(addbutton,SIGNAL(clicked()),this,SLOT(appL auncher()),Qt::DirectConnection);
//connect(&process,SIGNAL(error(QProcess::ProcessError)),this ,SLOT(processerror(QProcess::ProcessError)),Qt::Au toConnection);
}
SLOT function
void MainWindow::appLauncher()
{
qDebug()<<"App Launcher";
QString app = "/home/kamlesh/Gall/AddFolder/AddFolder-build-desktop/AddFolder";
process.start(app);
}
I have a button created in mainwindow and I connect the button "clicked " signal to the slot.
But I think Theres issue in the connection , thats the reason the slot is not called for the same
MainWindow::MainWindow()
{
//window specs
setWindowTitle(tr("GALLERY"));
resize(1350,1700);
//Allocation of items
settTree = new SettingsTree(this);
settTree->setGeometry(10,10,250,420);
listwidget = new QListWidget(this);
grid_button = new QPushButton(this);
grid_button->setGeometry(39,670,31,22);
list_button = new QPushButton(this);
addbutton = new QPushButton(this);
deletebutton = new QPushButton(this);
objectbutton = new QPushButton(this);
pf = new PanelFrame(this);
m_CheckBox = new QCheckBox(this);
m_CheckBox->setGeometry(230,14,21,21);
state = Qt::Unchecked;
m_Slider = new QSlider(Qt::Horizontal,this);
m_Slider->setGeometry(160,672,101,21);
//previewpane
/* previewpane = new QStandardItemModel(8,3,this);
setupmodel();
setupview();
*/
//functions to be called
Menu();
//connections:signal & slots
connect(list_button,SIGNAL(clicked()),this,SLOT(li stdisplay()),Qt::DirectConnection);
connect(m_CheckBox,SIGNAL(stateChanged(int)),this, SLOT(isMainWindowDocked()),Qt::AutoConnection);
connect(addbutton,SIGNAL(clicked()),this,SLOT(appL auncher()),Qt::DirectConnection);
//connect(&process,SIGNAL(error(QProcess::ProcessError)),this ,SLOT(processerror(QProcess::ProcessError)),Qt::Au toConnection);
}
SLOT function
void MainWindow::appLauncher()
{
qDebug()<<"App Launcher";
QString app = "/home/kamlesh/Gall/AddFolder/AddFolder-build-desktop/AddFolder";
process.start(app);
}