lima_will
24th September 2013, 22:00
Guys,
I'm trying to reproduce this example:
http://www.codeprogress.com/cpp/libraries/qt/showQtExample.php?index=140&key=QTableWidgetDetectHeaderClick
I'm using QT5, only returns me the error:
/home/will/Qt - Projetos/Telas/Variaveis.h:15: error: 'setClickable' was not declared in this scope
My current class is as follows:
#include <QMessageBox>
#include <QHeaderView>
#include <iostream>
#include <QtGui>
class myHeaderView : public QHeaderView
{
Q_OBJECT
public:
myHeaderView():QHeaderView(Qt::Horizontal)
{
he
setClickable(true);
connect(this,SIGNAL(sectionClicked(int)),this,SLOT (sectionClicked(int)));
}
~myHeaderView(){}
public slots:
void sectionClicked(int index)
{
QMessageBox::about(this,"Hi! Header Click Detected!","Index:"+QString::number(index));
}
};
I'm trying to reproduce this example:
http://www.codeprogress.com/cpp/libraries/qt/showQtExample.php?index=140&key=QTableWidgetDetectHeaderClick
I'm using QT5, only returns me the error:
/home/will/Qt - Projetos/Telas/Variaveis.h:15: error: 'setClickable' was not declared in this scope
My current class is as follows:
#include <QMessageBox>
#include <QHeaderView>
#include <iostream>
#include <QtGui>
class myHeaderView : public QHeaderView
{
Q_OBJECT
public:
myHeaderView():QHeaderView(Qt::Horizontal)
{
he
setClickable(true);
connect(this,SIGNAL(sectionClicked(int)),this,SLOT (sectionClicked(int)));
}
~myHeaderView(){}
public slots:
void sectionClicked(int index)
{
QMessageBox::about(this,"Hi! Header Click Detected!","Index:"+QString::number(index));
}
};