Results 1 to 2 of 2

Thread: [QT4 & XP] connect on QtreeView

  1. #1
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Thanks
    106
    Qt products
    Qt4
    Platforms
    Windows

    Default [QT4 & XP] connect on QtreeView

    Hi,

    I try to connect a clicked signal in my QTreeView table as follows :

    Qt Code:
    1. connect( table, SIGNAL( Clicked( const QModelIndex() ) ),
    2. this, SLOT( clickedActivated( const QModelIndex() ) ) );
    To copy to clipboard, switch view to plain text mode 


    But it does not work, probably because I have it all wrong.
    Can you help ?

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

    Default Re: [QT4 & XP] connect on QtreeView

    "Clicked" -> "clicked" and parameter types need correcting:

    Qt Code:
    1. connect(table, SIGNAL(clicked(const QModelIndex&)), this, SLOT(clickedActivated(const QModelIndex&)));
    To copy to clipboard, switch view to plain text mode 

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

    incapacitant (2nd March 2006)

Similar Threads

  1. [QT4 & XP] QTreeView issue with Designer form
    By incapacitant in forum Newbie
    Replies: 3
    Last Post: 2nd March 2006, 17:42
  2. [QT4 & XP] doubleClick on QtreeView
    By incapacitant in forum Newbie
    Replies: 2
    Last Post: 2nd March 2006, 12:15

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.