Results 1 to 13 of 13

Thread: Signals & Slots question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default Signals & Slots question

    Hi

    I'm struggling to get certain signal and slot combinations to work. I've used signals and slots successfully for a while now but at the moment I'm stuck with drag & drop operations. I want to be able to drag from a QTableView object and I connect the necessary signals in the way shown below:

    Qt Code:
    1. connect(tableViewWorkspace,SIGNAL(mousePressEvent(QMouseEvent *event)),this,SLOT(mousePressEventWorkspace(QMouseEvent *event)));
    To copy to clipboard, switch view to plain text mode 

    This does not seems to work and when I click in the table view it never enters the mousePressEventWorkspace function. Do I do something wrong? I know that mousePressEvent is a function of the QAbstractItemView class, but shouldn't it be called for the tableView object as well? Do I perhaps need some type of pointer along with some object casting?

    Thanks
    Jaco
    Last edited by jpn; 22nd August 2008 at 09:29. Reason: missing [code] tags

Similar Threads

  1. Signals and Slots
    By 83.manish in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 10:31
  2. Problem with SpinBox signals and slots
    By ramstormrage in forum Newbie
    Replies: 4
    Last Post: 2nd May 2008, 01:45
  3. signals and slots in plugins
    By anderl in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2007, 13:57
  4. newbe question about signals / slots
    By Walsi in forum Qt Programming
    Replies: 19
    Last Post: 20th April 2007, 10:54
  5. Signals and Slots question
    By Thoosle in forum Qt Programming
    Replies: 5
    Last Post: 5th December 2006, 00:24

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.