Results 1 to 2 of 2

Thread: paintEvent, QString to QPixmap, QLabel

  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany.
    Posts
    111
    Thanks
    29
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default paintEvent, QString to QPixmap, QLabel

    Hello again,

    is there a way to turn text into something which paintEvent() can draw?

    Or, to get the representation of text() in a QLabel as a QPixmap?

    related question:
    How can I get a QLabel so that I have a transparent backround - Just the text 'on the desktop'.

    I'm thinking about something aloing the lines of the shapedClock example...

    thanks
    K

  2. #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: paintEvent, QString to QPixmap, QLabel

    Quote Originally Posted by TheKedge View Post
    is there a way to turn text into something which paintEvent() can draw?
    QPainter::drawText()
    Or, to get the representation of text() in a QLabel as a QPixmap?
    I'm not sure what do you mean but maybe QPixmap::grabWidget().

    How can I get a QLabel so that I have a transparent backround - Just the text 'on the desktop'.
    QWidget::setMask()
    J-P Nurmi

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

    TheKedge (6th February 2007)

Similar Threads

  1. Replies: 3
    Last Post: 27th November 2006, 09:56
  2. QPixmap and HBITMAP
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2006, 16:24
  3. QSqlQueryModel + set Write
    By raphaelf in forum Qt Programming
    Replies: 7
    Last Post: 5th June 2006, 08:55
  4. Converting QString to unsigned char
    By salston in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 22:10
  5. [SOLVED] Widget plugin ... how to ?
    By yellowmat in forum Newbie
    Replies: 10
    Last Post: 29th January 2006, 20:41

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.