Results 1 to 2 of 2

Thread: Changing default event handler name

  1. #1
    Join Date
    Apr 2008
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Changing default event handler name

    I have a QPushButton that I want to change the default event handler name from on_btn_pressed to be the event handler another widget is currently assigned. Both widgets do the same task and I don't want to have to have two event handler's that do the same thing. Please help. Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Changing default event handler name

    You can assign multiple signals to the same slot, if that's what you're asking about. Just use QObject::connect to connect signals and slots and not the automatic connections feature.

Similar Threads

  1. changing default QCompleter ?
    By hicpalm in forum Qt Programming
    Replies: 2
    Last Post: 3rd March 2008, 10:49
  2. event handler
    By mattia in forum Newbie
    Replies: 10
    Last Post: 8th November 2007, 12:54

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.