PDA

View Full Version : how to specify the WFlags in QWidget....



sar_van81
21st December 2006, 18:22
hi...

can anyone say me how to specify the WFlags.i have a derived class from QWidget that i need to set as tool window as did as follows:

class keyclass : public QWidget
{
Q_OBJECT
public:
keyclass( QWidget *parent=0, const char *name=0,WStyle_Customize | WStyle_Tool);

private slots:
void a();
}.

but it showed me the following errors:

error: ‘WStyle_Customize’ is not a type
error: expected ‘,’ or ‘...’ before ‘|’ token
error: default argument missing for parameter 3 of ‘keyclass::keyclass(QWidget*, const char*, int)’

is this correct...?

jacek
21st December 2006, 19:52
keyclass( QWidget *parent=0, const char *name=0,WStyle_Customize | WStyle_Tool);
[...]
is this correct...?
No, it should be:
keyclass( QWidget *parent = 0, const char *name = 0, WFlags f = WStyle_Customize | WStyle_Tool);

sar_van81
22nd December 2006, 09:35
hi...

thank you for the reply. i set flags by
WFlags f= WType_Popup;

itself.