Results 1 to 3 of 3

Thread: undeclared method - GUI Styles

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    San Francisco, USA
    Posts
    14
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default undeclared method - GUI Styles

    Hi,

    I am getting the following error with the style() method.

    error: `drawItemText' has not been declared

    Do I need to configure Qt 4 (on win32 platform) with an option to get the GUI style libraries to configure correctly (I believe that may be the problem)?

    Thanks,
    Amanda

    Code excerpts:

    Qt Code:
    1. class StatusLabel : public QLabel
    2. { Q_OBJECT
    3. public:
    4. StatusLabel(QWidget *parent=0, const char *name=0);
    5.  
    6. protected:
    7. virtual void paintEvent(QPaintEvent *);
    8. };
    9.  
    10.  
    11. void StatusLabel:: paintEvent(QPaintEvent *)
    12. {
    13. QPixmap buffer(size());
    14. buffer.fill(paletteBackgroundColor());
    15. QPainter p(&buffer);
    16. QRect cr = contentsRect();
    17. style().drawItemText(&p, cr, alignment(), colorGroup(), isEnabled(), pixmap(), text());
    18. bitBlt(this, 0, 0, &buffer);
    19. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 19th November 2006 at 08:41. Reason: missing [code] tags

Similar Threads

  1. variable in method not initialized?!
    By frosch in forum Qt Programming
    Replies: 10
    Last Post: 3rd September 2006, 14:09
  2. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  3. Qt 4.1.4 plugin QPSQL
    By jcr in forum Installation and Deployment
    Replies: 4
    Last Post: 22nd June 2006, 22:55
  4. Unable to execute in Debug Mode
    By Kapil in forum Installation and Deployment
    Replies: 38
    Last Post: 5th April 2006, 07:27
  5. lQtGuid4 error - Compiler setting problem
    By Kapil in forum Installation and Deployment
    Replies: 7
    Last Post: 10th February 2006, 09:30

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
  •  
Qt is a trademark of The Qt Company.