Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, December 2006
Why not Trolltech release Qt 4 C++ plugin for Eclipse?


Message 1 in thread

Hi to all,

I don't find any good or decent IDE for use Qt4 OpenSource version.

I try a good OpenSource IDE , Eclipse for C++ programing and i like a
lot.
I use this version of Eclipse :

http://www.easyeclipse.org/site/distributions/cplusplus.html

The problem is that i can't develop inside this IDE for Qt4.

Why not Trolltech release Qt 4 C++ plugin for Eclipse?

I think this would be the best thing that Trolltech can do for
OpenSource developers.

--
 [ signature omitted ] 

Message 2 in thread

Have you tried QDevelop?

www.qdevelop.org

Good stuff.

-----Original Message-----
From: Gonzalez [mailto:ghempresa@xxxxxxxxxxx] 
Sent: Thursday, December 14, 2006 2:49 PM
To: qt-interest@xxxxxxxxxxxxx
Subject: Why not Trolltech release Qt 4 C++ plugin for Eclipse?


Hi to all,

I don't find any good or decent IDE for use Qt4 OpenSource version.

I try a good OpenSource IDE , Eclipse for C++ programing and i like a
lot.
I use this version of Eclipse :

http://www.easyeclipse.org/site/distributions/cplusplus.html

The problem is that i can't develop inside this IDE for Qt4.

Why not Trolltech release Qt 4 C++ plugin for Eclipse?

I think this would be the best thing that Trolltech can do for
OpenSource developers.

--
 [ signature omitted ] 

Message 3 in thread

On 14.12.06 14:57:29, Karl Ruetz wrote:
> Have you tried QDevelop?
> 
> www.qdevelop.org
> 
> Good stuff.

Oh yeah, right. That looked quite promising last time I looked (back
then it wasn't called qdevelop yet). And its written in Qt4, thats a big
plus ;)

Andreas

-- 
 [ signature omitted ] 

Message 4 in thread

Our company has supplanted KDevelop with QDevelop for two reasons:

1.  It is cross platform, we can develop in the same IDE in Linux and
Windoze.

2.  You can see the contents of QStrings when debugging.  Something we never
figured out how to do in KDevelop.

-----Original Message-----
From: Andreas Pakulat [mailto:apaku@xxxxxx] 
Sent: Thursday, December 14, 2006 3:22 PM
To: qt-interest@xxxxxxxxxxxxx
Subject: Re: Why not Trolltech release Qt 4 C++ plugin for Eclipse?

On 14.12.06 14:57:29, Karl Ruetz wrote:
> Have you tried QDevelop?
> 
> www.qdevelop.org
> 
> Good stuff.

Oh yeah, right. That looked quite promising last time I looked (back
then it wasn't called qdevelop yet). And its written in Qt4, thats a big
plus ;)

Andreas

-- 
 [ signature omitted ] 

Message 5 in thread

On 14.12.06 15:27:47, Karl Ruetz wrote:
> 1.  It is cross platform, we can develop in the same IDE in Linux and
> Windoze.

Well, as Qt3 wasn't open-source for Windows, which is the reason
kdevelop3 doesn't work there. However KDE4 and kdevelop4 target Windows
as operating system too.

> 2.  You can see the contents of QStrings when debugging.  Something we never
> figured out how to do in KDevelop.

Hmm, that works over here with the recent kdevelop versions pretty well
;)

But well, whatever works for you is fine with me, as long as its not MFC
;)

Andreas

-- 
 [ signature omitted ] 

Message 6 in thread

Karl Ruetz schrieb:
> Our company has supplanted KDevelop with QDevelop for two reasons:
> 
> 1.  It is cross platform, we can develop in the same IDE in Linux and
> Windoze.
> 
> 2.  You can see the contents of QStrings when debugging.  Something we never
> figured out how to do in KDevelop.

I got the attached files to use with gdb - that way gdb get to know how
to handle Qt-classes.

> 
> -----Original Message-----
> From: Andreas Pakulat [mailto:apaku@xxxxxx] 
> Sent: Thursday, December 14, 2006 3:22 PM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: Re: Why not Trolltech release Qt 4 C++ plugin for Eclipse?
> 
> On 14.12.06 14:57:29, Karl Ruetz wrote:
>> Have you tried QDevelop?
>>
>> www.qdevelop.org
>>
>> Good stuff.
> 
> Oh yeah, right. That looked quite promising last time I looked (back
> then it wasn't called qdevelop yet). And its written in Qt4, thats a big
> plus ;)
> 
> Andreas
> 
########################################################
########################################################
# This file contains gdb macros for displaying Qt4 types.
#
# To include these macros in gdb, at the (gdb) prompt, call 
# source gdb_macros.txt.  To invoke a macro, 
# call <macro_name> <variable_name>.  For example,
# to view a string, you would:
#
# (gdb) viewQString myString
########################################################

########################################################
# QString
########################################################

define viewQStringNoNewline
  set $i=0
  printf "\""
  while $i < $arg0.d->size
    printf "%c", $arg0.d->data[$i++]
  end
  printf "\""
end

document viewQStringNoNewline
  Displays a Qt4 QString without a trailing newline
end

define viewQString
  viewQStringNoNewline $arg0
  printf "\n"
end

document viewQString
  Displays a Qt4 QString
end

########################################################
# QPoint
# We cannot call QPoint::x() or QPoint::y() for
# convenience variables (e.g. those passed by viewQVariant).
# If we try to do so, we get an error of:  "Attempt to take
# address of value not located in memory."
# But the x and y values are swapped on Macs, so just beware.
########################################################

define viewQPointNoNewline
  printf "QPoint(%d, %d)", $arg0.xp, $arg0.yp
end

document viewQPointNoNewline
  Displays a Qt4 QPoint without a trailing newline
end

define viewQPoint
  viewQPointNoNewline $arg0
  printf "\n"
end

document viewQPoint
  Displays a Qt4 QPoint
end

########################################################
# QVariant
########################################################

define viewQVariant
  set $varType=$arg0.type()
  printf "QVariant(%s, ", $arg0.typeName()

  # Bool
  if $varType == 1
    set $varValue = $arg0.toBool()
    if $varValue == 1
      printf "true"
    else
      printf "false"
    end
  end

  # Int
  if $varType == 2
    set $varValue = $arg0.toInt(0)
    printf "%d", $varValue
  end

  # String
  if $varType == 10
    set $varValue = $arg0.toString()
    viewQStringNoNewline $varValue
  end

  # Point
  if $varType == 25
    set $varValue = $arg0.toPoint()
    viewQPointNoNewline $varValue
  end

  printf ")\n"
end
 
# This file defines handy gdb macros for printing out Qt types
# This file defines handy gdb macros for printing out Qt types
# To use it, add this line to your ~/.gdbinit :
# source /path/to/kde/sources/kdesdk/scripts/kde-devel-gdb

# Please don't use tabs in this file. When pasting a
# macro definition to gdb, tabs are interpreted as completion.

# Disable printing of static members. Qt has too many, it clutters the output
set print static-members off

# Show the real classname of object instances - e.g. (Kded *) 0x8073440 instead of (class QObject *) 0x8073440
set print object

define printqstring
    printqstringdata $arg0.d
end
document printqstring
  Prints the contents of a QString
end
define printq4string
    printq4stringdata $arg0.d
end
document printq4string
  Prints the contents of a Qt QString
end

define printqstringdata
    set $i=0
    set $d = (QStringData *)$arg0
    while $i < $d->len
        printf "%c", (char)($d->unicode[$i++].ucs & 0xff)
    end
    printf "\n"
end
document printqstringdata
  Prints the contents of a QStringData
  This is useful when the output of another command (e.g. printqmap)
  shows {d = 0xdeadbeef} for a QString, i.e. the qstringdata address
  instead of the QString object itself.
  printqstring $s and printqstringdata $s.d are equivalent.
end

define printq4stringdata
    set $i=0
    set $d = $arg0
    while $i < $d->size
        printf "%c", (char)($d->data[$i++] & 0xff)
    end
    printf "\n"
end
document printq4stringdata
  Prints the contents of a Qt4 QString::Data
  This is useful when the output of another command (e.g. printqmap)
  shows {d = 0xdeadbeef} for a QString, i.e. the qstringdata address
  instead of the QString object itself.
  printq4string $s and printq4stringdata $s.d are equivalent.
end

define printqstring_utf8
   set $i=0
   set $s = $arg0
   while $i < $s.d->len
     set $uc = (unsigned short) $s.d->unicode[$i++].ucs
     if ( $uc < 0x80 )
       printf "%c", (unsigned char)($uc & 0x7f)
     else
       if ( $uc < 0x0800 )
         printf "%c", (unsigned char)(0xc0 | ($uc >> 6))
       else
         printf "%c", (unsigned char)(0xe0 | ($uc >> 12)
         printf "%c", (unsigned char)(0x80 | (($uc > 6) &0x3f)
       end
       printf "%c", (unsigned char)(0x80 | ((uchar) $uc & 0x3f))
     end
   end
   printf "\n"
end
document printqstring_utf8
  Prints the contents of a QString encoded in utf8. 
  Nice if you run your debug session in a utf8 enabled terminal.
end

define printq4string_utf8
   set $i=0
   set $s = $arg0
   while $i < $s.d->size
     set $uc = (unsigned short) $s.d->data[$i++]
     if ( $uc < 0x80 )
       printf "%c", (unsigned char)($uc & 0x7f)
     else
       if ( $uc < 0x0800 )
         printf "%c", (unsigned char)(0xc0 | ($uc >> 6))
       else
         printf "%c", (unsigned char)(0xe0 | ($uc >> 12)
         printf "%c", (unsigned char)(0x80 | (($uc > 6) &0x3f)
       end
       printf "%c", (unsigned char)(0x80 | ((uchar) $uc & 0x3f))
     end
   end
   printf "\n"
end
document printq4string_utf8
  Prints the contents of a QString encoded in utf8. 
  Nice if you run your debug session in a utf8 enabled terminal.
end

define printqcstring
    print $arg0.shd.data
    print $arg0.shd.len
end
document printqcstring
  Prints the contents of a QCString (char * data, then length)
end

define printq4bytearray
    print $arg0->d->data
end
document printq4bytearray
  Prints the contents of a Qt4 QByteArray (when it contains a string)
end

define printqfont
    print *($arg0).d
    printqstring ($arg0).d->request.family
    print ($arg0).d->request.pointSize
end
document printqfont
  Prints the main attributes from a QFont, in particular the requested
  family and point size
end

define printqcolor
    printf "(%d,%d,%d)\n", ($arg0).red(), ($arg0).green(), ($arg0).blue()
end
document printqcolor
  Prints a QColor as (R,G,B).
  Usage: 'printqcolor <QColor col>
end

define printqmemarray
    # Maybe we could find it out the type by parsing "whatis $arg0"?
    set $arr = $arg0
    set $sz = sizeof($arg1)
    set $len = $arr->shd->len / $sz
    output $len
    printf " items in the array\n"
    set $i = 0
    while $i < $len
       # print "%s[%d] = %s\n", $arr, $i, *($arg1 *)(($arr->vec)[$i])
       print *($arg1 *)(($arr->shd->data) + ($i * $sz))
       set $i++
    end
end
document printqmemarray
  Prints the contents of a QMemArray. Pass the type as second argument.
end

define printqptrvector
    # Maybe we could find it out the type by parsing "whatis $arg0"?
    set $arr = $arg0
    set $len = $arr->len
    output $len
    printf " items in the vector\n"
    set $i = 0
    while $i < $len
       # print "%s[%d] = %s\n", $arr, $i, *($arg1 *)(($arr->vec)[$i])
       print *($arg1 *)(($arr->vec)[$i])
       set $i++
    end
end
document printqptrvector
  Prints the contents of a QPtrVector. Pass the type as second argument.
end

define printqptrvectoritem
    set $arr = $arg0
    set $i = $arg2
    print ($arg1 *)(($arr->vec)[$i])
    print *($arg1 *)(($arr->vec)[$i])
end
document printqptrvectoritem
  Print one item of a QPtrVector
  Usage: printqptrvectoritem vector type index
end

define printqmap
    set $map = $arg0
    set $len = $map.sh->node_count
    output $len
    printf " items in the map\n"
    set $header = $map.sh->header
    # How to parse the key and value types from whatis?
    set $it = (QMapNode<$arg1,$arg2> *)($header->left)
    while $it != $header
        printf " key="
        output $it->key
        printf " value="
        output $it->data
        printf "\n"
        _qmapiterator_inc $it
        set $it = (QMapNode<$arg1,$arg2> *)($ret)
    end
end
document printqmap
  Prints the full contents of a QMap
  Usage: 'printqmap map keytype valuetype'
end


define _qmapiterator_inc
    set $ret = $arg0
    if $ret->right != 0
        set $ret = $ret->right
        while $ret->left != 0
            set $ret = $ret->left
        end
    else
        set $y = $ret->parent
        while $ret == $y->right
            set $ret = $y
            set $y = $y->parent
        end
        if $ret->right != $y
            set $ret = $y
        end
    end
end
document _qmapiterator_inc
  Increment a qmap iterator (internal method, used by printqmap)
end

define printqptrlist
    set $list = $arg0
    set $len = $list.numNodes
    output $len
    printf " items in the list\n"
    set $it = $list.firstNode
    while $it != 0
        output $it->data
        printf "\n"
        set $it = $it->next
    end
end
document printqptrlist
  Prints the contents of a QPtrList.
  Usage: printqptrlist mylist
end

define printqvaluelist
    set $list = $arg0
    set $len = $list.sh->nodes
    output $len
    printf " items in the list\n"
    set $it = $list.sh->node->next
    set $end = $list.sh->node
    while $it != $end
        output $it->data
        printf "\n"
        set $it = $it->next
    end
end
document printqvaluelist
  Prints the contents of a QValueList.
  Usage: printqvaluelist mylist
end

define printqstringlist
    set $list = $arg0
    set $len = $list.sh->nodes
    output $len
    printf " items in the list\n"
    set $it = $list.sh->node->next
    set $end = $list.sh->node
    while $it != $end
        printqstring $it->data
        set $it = $it->next
    end
end
document printqstringlist
  Prints the contents of a QStringList.
  Usage: printqstringlist mylist
end

define printqregion
    printqmemarray $arg0.rects() QRect
end
document printqregion
  Prints the rectangles that make up a QRegion. Needs a running process.
  Usage: printqregion myregion
end

# Bad implementation, requires a running process.
# Needs to be refined, i.e. figuring out the right void* pointers casts.
# Simon says: each Node contains the d pointer of the QString.
define printq4stringlist
    # This is ugly, but we need to avoid conflicts with printq4string's own vars...
    set $q4sl_i = 0
    set $q4sl_d = & $arg0
    set $q4sl_sz = $q4sl_d->size()
    while $q4sl_i < $q4sl_sz
        output $q4sl_i
        printf " "
        printq4string $q4sl_d->at($q4sl_i++)
    end
end
document printq4stringlist
  Prints the contents of a Qt4 QStringList.
  Usage: printq4stringlist mylist
end

define identifyq4object
    set $obj=$arg0
    set $objectName=((QObjectPrivate *)($obj->d_ptr))->objectName
    printf " name:"
    printq4string $objectName
    printf " class:"
    # this requires a process, though
    print $obj->metaObject()->className()
end

# You print QString's too often to type the long name :-)
define qs4
  printq4string $arg0
end

define qs3
  printqstring $arg0
end
 

Message 7 in thread

On 14.12.06 20:48:55, Gonzalez wrote:
> I don't find any good or decent IDE for use Qt4 OpenSource version.

For Linux OS I recommend KDevelop 3.4, downloadable from
www.kdevelop.org (rc1 or soon rc2).

> I try a good OpenSource IDE , Eclipse for C++ programing and i like a
> lot.
> I use this version of Eclipse :
> 
> http://www.easyeclipse.org/site/distributions/cplusplus.html
> 
> The problem is that i can't develop inside this IDE for Qt4.

I recall there's a plugin to work with QMake projects, but I can't find
it at the moment.

> Why not Trolltech release Qt 4 C++ plugin for Eclipse?

Because TT is not paid for doing so, I guess. And IMHO the CDT plugin
isn't worth the effort, its really not that great, especially Code
Completion.

Andreas

-- 
 [ signature omitted ] 

Message 8 in thread

> Why not Trolltech release Qt 4 C++ plugin for Eclipse?

Look at: http://artis.imag.fr/Membres/Xavier.Decoret/resources/qt/eclipse/
It's not from Trolltech, but it's great :-)

Malte

--
 [ signature omitted ] 

Message 9 in thread

Malte Witt schrieb:
> Look at: http://artis.imag.fr/Membres/Xavier.Decoret/resources/qt/eclipse/
> It's not from Trolltech, but it's great :-)

That's a nice hint; thanks Malte! However, I read something about using 
the OS version of Qt with MinGW; what about commercial versions and 
VC[6|2005] toolchain? Unfortunately QDevelop is clearly targetted to a 
gcc environment :-(

Martin

-- 
 [ signature omitted ] 

Message 10 in thread

qdevelop is mingw qt4 compiler
but you can use other xp compiler...
myself i prefer mingw (gcc) ...
ms visual studio 2005 (but i don't like it too much craps)
Henri



Martin Gebert wrote:
> Malte Witt schrieb:
>> Look at: 
>> http://artis.imag.fr/Membres/Xavier.Decoret/resources/qt/eclipse/
>> It's not from Trolltech, but it's great :-)
>
> That's a nice hint; thanks Malte! However, I read something about 
> using the OS version of Qt with MinGW; what about commercial versions 
> and VC[6|2005] toolchain? Unfortunately QDevelop is clearly targetted 
> to a gcc environment :-(
>
> Martin
>

--
 [ signature omitted ] 

Message 11 in thread

Malte Witt wrote:
>> Why not Trolltech release Qt 4 C++ plugin for Eclipse?
>>     
>
> Look at: http://artis.imag.fr/Membres/Xavier.Decoret/resources/qt/eclipse/
> It's not from Trolltech, but it's great :-)

I thought QtClipse looked good too, so I spent the hour downloading 
Eclipse, the CDT, and QtClipse, only to discover that it's no more than 
a simple tool for managing your .pro file. I can do that much more 
easily in Vim. In short, QtClipse might be useful if you already use 
Eclipse for C++ development, and you want to work with Qt in Eclipse 
also, but for me it fell short. I use Vim and xterm and couldn't be happier.

--Dave

--
 [ signature omitted ] 

Message 12 in thread

I used eclipse 3.2/CDT3.1 and Qt 4.2.2. on windows and fc5/JDK5.  I launch
qmake, qmake project, and the qt tools(designer, linquist, and assistant)
from the external tools tab on eclipse.  Create your make targets and it
works quite well.

One issue I am having on my recent migration to fc6 is that it looks as
though the fedora/gnu java isn't working as well for me as the sun jdk 5.0.
My eclipse development environment just isn't what it was on the
fc5/eclipse3.2/CDT3.1/JDK5.

---
John Price  <john.p.price@xxxxxxxxxx> 781-970-1743
L-3 Communications
Security & Detection Systems Division, 
10E Commerce Way, Woburn, MA 01801
 

-----Original Message-----
From: Andreas Pakulat [mailto:apaku@xxxxxx] 
Sent: Thursday, December 14, 2006 4:20 PM
To: qt-interest@xxxxxxxxxxxxx
Subject: Re: Why not Trolltech release Qt 4 C++ plugin for Eclipse?

On 14.12.06 20:48:55, Gonzalez wrote:
> I don't find any good or decent IDE for use Qt4 OpenSource version.

For Linux OS I recommend KDevelop 3.4, downloadable from
www.kdevelop.org (rc1 or soon rc2).

> I try a good OpenSource IDE , Eclipse for C++ programing and i like a
> lot.
> I use this version of Eclipse :
> 
> http://www.easyeclipse.org/site/distributions/cplusplus.html
> 
> The problem is that i can't develop inside this IDE for Qt4.

I recall there's a plugin to work with QMake projects, but I can't find
it at the moment.

> Why not Trolltech release Qt 4 C++ plugin for Eclipse?

Because TT is not paid for doing so, I guess. And IMHO the CDT plugin
isn't worth the effort, its really not that great, especially Code
Completion.

Andreas

-- 
 [ signature omitted ] 

Message 13 in thread

Yep... it would so much nicer if Eclipse was made with QT rather then
Java :) isn't that kdevelop :)

Scott

> -----Original Message-----
> From: Price, John [mailto:john.p.price@xxxxxxxxxx]
> Sent: Thursday, December 14, 2006 3:07 PM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: RE: Why not Trolltech release Qt 4 C++ plugin for Eclipse?
> 
> I used eclipse 3.2/CDT3.1 and Qt 4.2.2. on windows and fc5/JDK5.  I
launch
> qmake, qmake project, and the qt tools(designer, linquist, and
assistant)
> from the external tools tab on eclipse.  Create your make targets and
it
> works quite well.
> 
> One issue I am having on my recent migration to fc6 is that it looks
as
> though the fedora/gnu java isn't working as well for me as the sun jdk
> 5.0.
> My eclipse development environment just isn't what it was on the
> fc5/eclipse3.2/CDT3.1/JDK5.
> 
> ---
> John Price  <john.p.price@xxxxxxxxxx> 781-970-1743
> L-3 Communications
> Security & Detection Systems Division,
> 10E Commerce Way, Woburn, MA 01801
> 
> 
> -----Original Message-----
> From: Andreas Pakulat [mailto:apaku@xxxxxx]
> Sent: Thursday, December 14, 2006 4:20 PM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: Re: Why not Trolltech release Qt 4 C++ plugin for Eclipse?
> 
> On 14.12.06 20:48:55, Gonzalez wrote:
> > I don't find any good or decent IDE for use Qt4 OpenSource version.
> 
> For Linux OS I recommend KDevelop 3.4, downloadable from
> www.kdevelop.org (rc1 or soon rc2).
> 
> > I try a good OpenSource IDE , Eclipse for C++ programing and i like
a
> > lot.
> > I use this version of Eclipse :
> >
> > http://www.easyeclipse.org/site/distributions/cplusplus.html
> >
> > The problem is that i can't develop inside this IDE for Qt4.
> 
> I recall there's a plugin to work with QMake projects, but I can't
find
> it at the moment.
> 
> > Why not Trolltech release Qt 4 C++ plugin for Eclipse?
> 
> Because TT is not paid for doing so, I guess. And IMHO the CDT plugin
> isn't worth the effort, its really not that great, especially Code
> Completion.
> 
> Andreas
> 
> --
> You will be run over by a beer truck.
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ]