
Originally Posted by
regix
The little application you posted ran fine on Gnome. It terminated like it should. My application also terminates but it shouldn't: after getting the color the program goes on ...
Either the problem lies in some other place or that example program was too simple.
Try this:
#include <qapplication.h>
#include <qcolordialog.h>
#include <qpushbutton.h>
{
Q_OBJECT
public:
{
connect( this, SIGNAL( clicked() ), this, SLOT( onClick() ) );
}
private slots:
void onClick()
{
}
};
int main( int argc, char **argv )
{
Test t;
t.show();
app.setMainWidget( &t );
return app.exec();
}
#include "main.moc"
#include <qapplication.h>
#include <qcolordialog.h>
#include <qpushbutton.h>
class Test : public QPushButton
{
Q_OBJECT
public:
Test() : QPushButton( "test", 0 )
{
connect( this, SIGNAL( clicked() ), this, SLOT( onClick() ) );
}
private slots:
void onClick()
{
QColorDialog::getColor();
}
};
int main( int argc, char **argv )
{
QApplication app( argc, argv );
Test t;
t.show();
app.setMainWidget( &t );
return app.exec();
}
#include "main.moc"
To copy to clipboard, switch view to plain text mode

Originally Posted by
regix
I commented this out but the same remark appears when I run the program....
There were at least two such warnings, so maybe one of them is gone, but you still see the other?
Bookmarks