Results 1 to 3 of 3

Thread: how to specify the WFlags in QWidget....

  1. #1
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default how to specify the WFlags in QWidget....

    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...?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to specify the WFlags in QWidget....

    Quote Originally Posted by sar_van81 View Post
    keyclass( QWidget *parent=0, const char *name=0,WStyle_Customize | WStyle_Tool);
    [...]
    is this correct...?
    No, it should be:
    Qt Code:
    1. keyclass( QWidget *parent = 0, const char *name = 0, WFlags f = WStyle_Customize | WStyle_Tool);
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to jacek for this useful post:

    nleverin (21st January 2008)

  4. #3
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: how to specify the WFlags in QWidget....

    hi...

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

    itself.

Similar Threads

  1. QWidget -> updateGeometry dont work.
    By patrik08 in forum Qt Programming
    Replies: 7
    Last Post: 22nd May 2013, 15:55
  2. Transparent QWidget on QGLWidget
    By showhand in forum Qt Programming
    Replies: 2
    Last Post: 27th November 2006, 01:00
  3. Replies: 5
    Last Post: 4th August 2006, 10:12
  4. Replies: 1
    Last Post: 2nd May 2006, 21:11
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 22:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.