It probably creates the right object, but your custom widget is wrong.
It should be:
{
Q_OBJECT
public :
SpreadSheet
( QWidget* a_parent
= 0 );
SpreadSheet
( int a_row
= 1,
int a_column
= 4,
QWidget *a_parent
= 0 );
void CreatePopupMenu();
private slots:
void ChooseColor();
void ExecPopupMenu( int, int );
private:
unsigned row;
unsigned column;
Q3PopupMenu *menu;
};
class SpreadSheet : public QTableWidget
{
Q_OBJECT
public :
SpreadSheet( QWidget* a_parent = 0 );
SpreadSheet( int a_row = 1, int a_column = 4, QWidget *a_parent = 0 );
void CreatePopupMenu();
private slots:
void ChooseColor();
void ExecPopupMenu( int, int );
private:
unsigned row;
unsigned column;
Q3PopupMenu *menu;
QAction *colorBackAct;
QAction *colorTextAct;
QColor color;
};
To copy to clipboard, switch view to plain text mode
PS. Next time, please, use [ code ] tags to make your code readable.
Bookmarks