Results 1 to 2 of 2

Thread: button to slots

  1. #1

    Smile button to slots

    I am a nubie at Qt and would like some help. I am trying to create a button widget that when clicked would go to a execute the slot of another widget called paintEvent. Do you have any ideas how to do this ?
    I have attempted to do this, but I get the following error:
    QObject::connect: Cannot connect QPushButton::clicked() to (null):aintEvent(QPaintEvent * e)

  2. #2
    Join Date
    Jan 2008
    Location
    Finland /Pakistan
    Posts
    216
    Thanks
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: button to slots

    I am not sure if i understand what you are trying to explain...
    you are mistaken because paintEvent() is not a slot ,so to repaint just call the update() which is a slot or if you want also some extra work apart from repaint make your own slot..

Similar Threads

  1. button with backgr and icon using stylesheets
    By s_p_t10 in forum Qt Programming
    Replies: 0
    Last Post: 7th May 2008, 21:19
  2. problem about mouse button events
    By vql in forum Qt Programming
    Replies: 1
    Last Post: 29th April 2008, 11:14
  3. question about button
    By narumi in forum Newbie
    Replies: 2
    Last Post: 21st January 2008, 06:44
  4. Button with signals and slots
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 4th December 2006, 23:24
  5. Push button double click
    By curtisw in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2006, 17:40

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.