[Qt-creator] Two questions

Orgad and Raizel Shaneh orgads at gmail.com
Sat Sep 1 22:36:42 CEST 2012


On Fri, Aug 31, 2012 at 6:55 PM, Igor Mironchik <imironchick at gmail.com>wrote:

> Hi, I have two questions.
>
> First, I think should be easy, how to say to QtCreator not to do insert
> spaces instead of tabs? And how to say him to make indentation with tabs
> instead of spaces?
>

For source files:
Tools -> Options -> C++ -> Code Style, Copy Qt style then edit the copied
style.

For other files:
Tools -> Options -> Text Editor -> Behavior. Change Tab policy to Spaces
Only


> And second, why autocompletion doesn't work for "d" member in the next
> example:
>
> In header:
>
> class Test {
> public:
>      Test();
>
>      void doIt();
>
> private:
>      Q_DISABLE_COPY( Test )
>
>      class TestPrivate;
>      QScopedPointer< TestPrivate > d;
> };
>
> In source:
>
> class Test::TestPrivate {
> public
>      QString m_string;
> };
>
> Test::Test()
>      :    d( new TestPrivate )
> {
> }
>
> void
> Test::doIt()
> {
>      qDebug() << d-> // And here autocompletion doesn't work. Why?
> }
>

Works here with 2.5 and 2.6. Which version of Qt Creator do you use?

- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20120901/12adb781/attachment.html>


More information about the Qt-creator mailing list