Results 1 to 4 of 4

Thread: add QPainter widget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: add QPainter widget

    Well, actually this is not really a Qt but pure C++ issue. It should be something more like:
    Qt Code:
    1. QLabel* l = new QLabel; // don't just declare a pointer, actually allocate something
    2. l->setPixmap(pm); // use "->", not "."
    3. mainLayout->addWidget(l);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    tommy (9th November 2007)

Similar Threads

  1. [qt4,win,g++] QPainter on a QGLWidget
    By jh in forum Qt Programming
    Replies: 4
    Last Post: 28th July 2008, 06:29
  2. Replies: 3
    Last Post: 17th October 2007, 12:52
  3. transparent background of the main widget
    By nagpalma in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2007, 17:52
  4. Replies: 7
    Last Post: 20th March 2006, 20:03
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.