1

For some reason this is giving me an error:

#include <QtGui/QApplication>
#include <QWidget>
#include <QCheckBox>

QWidget window;
QCheckBox botonera = new QCheckBox(window);

The error seems to be about the window (should be a pointer to QWidget), like QWidget * window;, but nothing seems to work. Any ideas?

4

1 回答 1

0

If this is your code, window is null. Or it has not been initialized....

So you need something like:

QWidget window = new QWidget();
QCheckBox botonera = new QCheckBox(window);
于 2013-08-07T16:59:15.867 回答