It seems to me that it would be preferable to make it use edit
triggers, and therefore connect to the edit(QModelIndex) signal, so
that making it configurable in the preferences is just a matter of
m_view->setEditTriggers().

On Wed, Oct 7, 2009 at 9:12 AM, Will Stokes <[email protected]> wrote:
> I dug through the source code and it appears changing the project tree
> to open a file by single instead of double clicking is pretty easy.
> Line 157 of projecttreewidget.cpp connects the view's activated signal
> to the openItem slot. Instead of using activated used clicked (or
> double clicked depending on a user preference), aka:
>
> connect(m_view, SIGNAL(clicked(const QModelIndex&)),
>             this, SLOT(openItem(const QModelIndex&)));
>
> instead of:
>
> connect(m_view, SIGNAL(activated(const QModelIndex&)),
>             this, SLOT(openItem(const QModelIndex&)));
>
> I haven't tested this change myself since I don't have Qt4.6 on my
> system at this time.
>
> -Will
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to