[Qt-creator] Source/header file templates

2009-12-23 Thread Manuel Fiorelli
Hello list,
it seems to me that I cannot define a template for new source/header
files. IMHO, it would be useful, when the program is released under a
license (e.g. GPL),
which requires that you apply a standard header at top of every
source/header file.

Obviously, the templates should be defined on a per-project basis and
it would be nice if Qt Creator could suggest to me the right header
for a given license.

Manuel Fiorelli
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Source/header file templates

2009-12-23 Thread Christian Kandeler
On Wednesday 23 December 2009 09:44:07 ext Manuel Fiorelli wrote:

 it seems to me that I cannot define a template for new source/header
 files.

Options - C++ - File Naming - License Template.
(Admittedly not the most intuitive location.)

 Obviously, the templates should be defined on a per-project basis and
 it would be nice if Qt Creator could suggest to me the right header
 for a given license.

So far, this setting is global, but it seems sensible to make it per-project. 
You may want to add a suggestion at http://bugreports.qt.nokia.com/

Christian
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Source/header file templates

2009-12-23 Thread Manuel Fiorelli
2009/12/23 Christian Kandeler christian.kande...@nokia.com:
 On Wednesday 23 December 2009 09:44:07 ext Manuel Fiorelli wrote:

 it seems to me that I cannot define a template for new source/header
 files.

 Options - C++ - File Naming - License Template.
 (Admittedly not the most intuitive location.)

Ops...I forgot to mention that I run Qt Creator 1.2.1 from Debian repositories.
Thanks for the answer. I'll download the latest package from Qt and
I'll take a look at
that option.

Manuel Fiorelli
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Can't run with shared library

2009-12-23 Thread Christian Kandeler
On Wednesday 23 December 2009 00:11:18 ext Chasc wrote:

 I have generated a shared library (.so file) and am trying to run an app
 I have developed in Qt-creator using the library but so far without
 success. Can anybody help me with this or perhaps direct me to the
 relevant documentation? My platform is linux.

If I understand you correctly, you want to make your library be linked to your 
application? In that case, add the following to your project (.pro) file:
LIBS += -Lpath-to-lib -llib-name
(This is what it looks like for UNIX-like systems; other platforms have 
different syntax, but also use the LIBS variable.)

Christian
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Can't run with shared library

2009-12-23 Thread Chasc
On Wed, 2009-12-23 at 10:18 +0100, Christian Kandeler wrote:
 On Wednesday 23 December 2009 00:11:18 ext Chasc wrote:
 
  I have generated a shared library (.so file) and am trying to run an app
  I have developed in Qt-creator using the library but so far without
  success. Can anybody help me with this or perhaps direct me to the
  relevant documentation? My platform is linux.
 
 If I understand you correctly, you want to make your library be linked to 
 your 
 application? In that case, add the following to your project (.pro) file:
   LIBS += -Lpath-to-lib -llib-name
 (This is what it looks like for UNIX-like systems; other platforms have 
 different syntax, but also use the LIBS variable.)
 
 Christian
 ___

Done that. The app now compiles but when I run it I get:
symbol lookup error: undefined symbol: _Z6centerP11QMainWindow 
exited with code 127. I was able to compile and run when I had included
the source code. All I have done is replaced the source code with the
shared library plus added the LIBS line in the project file. I am still
using the headers for the library.

pcor




___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Can't run with shared library

2009-12-23 Thread Christian Kandeler
On Wednesday 23 December 2009 12:04:32 ext Chasc wrote:
 On Wed, 2009-12-23 at 10:18 +0100, Christian Kandeler wrote:
  On Wednesday 23 December 2009 00:11:18 ext Chasc wrote:
   I have generated a shared library (.so file) and am trying to run an
   app I have developed in Qt-creator using the library but so far without
   success. Can anybody help me with this or perhaps direct me to the
   relevant documentation? My platform is linux.
 
  If I understand you correctly, you want to make your library be linked to
  your application? In that case, add the following to your project (.pro)
  file: LIBS += -Lpath-to-lib -llib-name
  (This is what it looks like for UNIX-like systems; other platforms have
  different syntax, but also use the LIBS variable.)
 
  Christian
  ___

 Done that. The app now compiles but when I run it I get:
 symbol lookup error: undefined symbol: _Z6centerP11QMainWindow
 exited with code 127. I was able to compile and run when I had included
 the source code. All I have done is replaced the source code with the
 shared library plus added the LIBS line in the project file. I am still
 using the headers for the library.

Apparently, the dynamic linker cannot find the library. Either copy it to a 
standard system directory, or add its directory to the LD_LIBRARY_PATH 
variable. If you intend to exclusively run the application directly from Qt 
Creator while you're developing it, you can also edit the same variable in 
the project's runs settings (in the Run Environment part).

Christian
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Navigating inside Editor question or suggestion

2009-12-23 Thread Matthias Ettrich
On Tuesday 22 December 2009 07:41:54 ext Christian Dähn wrote:
 Anybody suggesting me to use Ctrl+F should consider that the search
 doesn't work with just one keystroke - you have to select the word,
 then press Ctrl+F, then Enter to start the search and then you have
 to use (Shift+)F3 to go forward/backward.

Nope, you must not preselect the word, creator will automatically select the 
word under the cursor. 

Currently there are three shortcuts for jumping to the next word under the 
cursor provided there is no text selection:

1. Ctrl+F Enter Esc 
2. Ctrl+F F3 Esc
3. Ctrl+F Esc F3

By Emacs and VI standards those are pretty short shortcuts :-) They all also 
have the nice side effect of highlighting all occurences of the word in 
question. Hitting Esc one more time removes the highlighting.

Adding additional methods that you can bind keys to would be quite trivial. I 
would suggest doing it on the basetexteditor level.

What other IDEs or Editors do have specialised methods for that, and what are 
the default keybindings?

 Matthias

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Qt Creator doesnt detect Header files

2009-12-23 Thread Coda Highland
Add the files to the HEADERS variable in your .pro file and that
should help, although I don't know if F4 will switch between the
correct files or not.

/s/ Adam

On Wed, Dec 23, 2009 at 2:54 AM, Rajeev J Sebastian
rajeev.sebast...@gmail.com wrote:
 Hi,

 Qt Creator doesnt seem to detect some special header files for a given
 .cpp file.

 In one project, the header files did not have a .h extension.

 E.g.,

 MyClass
 MyClass.cpp

 In the same project, one class was being generated from a .h.in file:

 MyClass.h.in
 MyClass.h (- generated from .in)
 MyClass.cpp

 Is there some way to get Qt Creator to detect these ?



 Unrelated question: I'm using waf to build my project. To get Qt
 Creator to issue ./waf build in the Project Directory, i have to
 create a Custom Step. But, I cannot get rid of the Make step, and so,
 i have to create a dummy Makefile with an all target. Is there some
 way I can avoid this ?

 Regards
 Rajeev J Sebastian
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Navigating inside Editor question or suggestion

2009-12-23 Thread Christian Dähn
Hi,

 Nope, you must not preselect the word, creator will automatically select the 
 word under the cursor. 
 
 Currently there are three shortcuts for jumping to the next word under the 
 cursor provided there is no text selection:
 
 1. Ctrl+F Enter Esc 
 2. Ctrl+F F3 Esc
 3. Ctrl+F Esc F3
 
 What other IDEs or Editors do have specialised methods for that, and what are 
 the default keybindings?

I used (e)FTE (http://efte.sourceforge.net) - a tribute to old
Borland IDEs - where you just have to press Alt+, to move to 
previous or Atl+. for next occurrence of word under cursor.
This IDE is minimalistic and has a console-only (NCurses) version, too.

And HaiQ (http://haiq-info.org) a quite flexible Qt IDE -
which has some nice editing features Qt Creator users can dream of -
for example: a word completion working for any words and working
even inside strings and macros - a big time saver.

ciao,
Chris


___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


[Qt-creator] Translation Linguist issues

2009-12-23 Thread M. Bashir Al-Noimi

Hi All,

I'm working on creating a new open source portal so I need to find 
solutions for some Qt  Qt Creator issues, I wish to help me for finding 
them :-D


  1. Is there any plan or task for integrating Linguist in Qt Creator?
  2. Is there any plan or task for creating a wizard in Qt Creator for
 adding translations to specific project instead of manual adding?
  3. Is there any tool for adding tr() function automatically for whole
 strings in specific project?
  4. Currently, Phrase Book doesn't prevent duplicates! How I can fix
 this issue?
  5. How I can collect .ts, .po and .xlf files in single Phrase Book?
  6. Although Linguist supports .po files but it can't release .mo
 files! Is there any plan or task for adding this feature?
  7. Currently, all translators have to call lupdate from command line
 for updating the translations, Is there any plan or task for
 adding update action in Linguist just like release action?

Important notes:

   * Most these issues are solved in many GTK's development
 environments where are not exist or don't have practical solutions
 in Qt (ex. current Phrase Book doesn't help translators groups for
 working together).
   * I prefer to get answers for all my questions (sure if you can)
 because I'm planning to add some features to Linguist if they
 aren't exist or you don't have plans for them.


--
Best Regards
Muhammad Bashir Al-Noimi
My Blog: http://mbnoimi.net

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] other languages syntax highlight support

2009-12-23 Thread paulo
Thanks, that sounds really nice.
I'll definitely take a look at it as soon as I have time.
I'm busy trying to write what is supposed to be a master thesis... 
(still allot to implement hohoho).
Never mind, thanks for the tip, and merry Christmas.

Paulo

Lorenzo Bettini wrote:
 paulo wrote:
   
 Hi,

 is there a obvious way to add syntax highlight to qt-creator, for other 
 languages?
 In my case, I would like to use qt-creator to edit my glsl files.
 Is it possible to do this through a config/rules file?

 Thanks
 Paulo
 

 Recently I released http://srchiliteqt.sourceforge.net/ which adds 
 highlighting support to a qt text editor by relying on GNU 
 Source-highlight (http://www.gnu.org/software/src-highlite/) which 
 already supports glsl...

 I don't know how to integrate it into qt-creator, though, but it might 
 be worth trying, and if I can provide help I'd do that with pleasure :)

 cheers
   Lorenzo

   

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


[Qt-creator] How set -rpath or -rpath-link from QT project file?

2009-12-23 Thread Ed Sutton
When I run the Qt created Makefile to build the client that uses my shared 
library, I get the following warning:

/mylib.so, not found (try using -rpath or -rpath-link)

Can someone please provide and example of what to add to the QT project file to 
generate a happy Makefile?  

It builds fine from within QT Creator after I had set the build environment 
LD_LIBRARY_PATH to include the shared library path. 

Thanks in advance,

-Ed


___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] How set -rpath or -rpath-link from QT project file?

2009-12-23 Thread Marc Durant
You'll need to add an rpath option in your .pro file.  Here's an  
example from one of my projects where I give the library directory for  
python, the rpath directory, and then the library itself.  The  
directory named by rpath tells the executable where to look for this  
particular library.

LIBS += -L/home/mdurant/Source/visit2_svn/visit/python/2.5/linux- 
x86_64_gcc-4.3.0/lib/python2.5/config \
 -Wl,-rpath,/home/mdurant/Source/visit2_svn/visit2.0.0/ 
python/2.5/linux-x86_64_gcc-4.3.0/lib/python2.5/config \
 -lpython2.5

-marc

On Dec 23, 2009, at 12:16 PM, Ed Sutton wrote:

 When I run the Qt created Makefile to build the client that uses my  
 shared library, I get the following warning:

 /mylib.so, not found (try using -rpath or -rpath-link)

 Can someone please provide and example of what to add to the QT  
 project file to generate a happy Makefile?

 It builds fine from within QT Creator after I had set the build  
 environment LD_LIBRARY_PATH to include the shared library path.

 Thanks in advance,

 -Ed


 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Navigating inside Editor question or suggestion

2009-12-23 Thread matthias.ettrich
Chris,

the IDEs you mention seem to satisfy your needs much better than Qt Creator, 
may I ask why you are interested in Qt Creator at all?

I mean, if you prefer string based completion over semantical completion, Qt 
Creator clearly isn't the tool for you. Creator is all about understanding C++, 
and that is the direction it will continue to move into.

Matthias


From: qt-creator-boun...@trolltech.com [qt-creator-boun...@trolltech.com] On 
Behalf Of ext Christian Dähn [da...@asinteg.de]
Sent: Wednesday, December 23, 2009 5:36 PM
To: qt-creator@trolltech.com
Subject: Re: [Qt-creator] Navigating inside Editor question or suggestion

Hi,

 Nope, you must not preselect the word, creator will automatically select the 
 word under the cursor.

 Currently there are three shortcuts for jumping to the next word under the 
 cursor provided there is no text selection:

 1. Ctrl+F Enter Esc
 2. Ctrl+F F3 Esc
 3. Ctrl+F Esc F3

 What other IDEs or Editors do have specialised methods for that, and what are 
 the default keybindings?

I used (e)FTE (http://efte.sourceforge.net) - a tribute to old
Borland IDEs - where you just have to press Alt+, to move to
previous or Atl+. for next occurrence of word under cursor.
This IDE is minimalistic and has a console-only (NCurses) version, too.

And HaiQ (http://haiq-info.org) a quite flexible Qt IDE -
which has some nice editing features Qt Creator users can dream of -
for example: a word completion working for any words and working
even inside strings and macros - a big time saver.

ciao,
Chris


___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] How set -rpath or -rpath-link from QT project file?

2009-12-23 Thread Coda Highland
While technically correct I strongly suggest against using absolute
paths into your home directory like that. I would recommend instead
using $$(PWD) as the base for a path (for instance, $$(PWD)/../mylib/)
so that other people can build your project and still have it work.

/s/ Adam

On Wed, Dec 23, 2009 at 1:32 PM, Marc Durant mdur...@txcorp.com wrote:
 You'll need to add an rpath option in your .pro file.  Here's an
 example from one of my projects where I give the library directory for
 python, the rpath directory, and then the library itself.  The
 directory named by rpath tells the executable where to look for this
 particular library.

 LIBS += -L/home/mdurant/Source/visit2_svn/visit/python/2.5/linux-
 x86_64_gcc-4.3.0/lib/python2.5/config \
             -Wl,-rpath,/home/mdurant/Source/visit2_svn/visit2.0.0/
 python/2.5/linux-x86_64_gcc-4.3.0/lib/python2.5/config \
             -lpython2.5

 -marc

 On Dec 23, 2009, at 12:16 PM, Ed Sutton wrote:

 When I run the Qt created Makefile to build the client that uses my
 shared library, I get the following warning:

 /mylib.so, not found (try using -rpath or -rpath-link)

 Can someone please provide and example of what to add to the QT
 project file to generate a happy Makefile?

 It builds fine from within QT Creator after I had set the build
 environment LD_LIBRARY_PATH to include the shared library path.

 Thanks in advance,

 -Ed


 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator

 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator


___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Navigating inside Editor question or suggestion

2009-12-23 Thread Coda Highland
 Visual Studio uses Ctrl-F3 to find the next occurrence of the word under the
 cursor, and F3 to find the next after that.

That is to say, Ctrl+F3 is search for next occurrence of current
word; F3 is find again no matter how you started the search.

In vim, shift+8 is find next occurrence of current word and shift+3
is find previous occurrence of current word. In both cases you can
use n to continue or use the same keystroke. (Apparently the
mnemonic is that it's * and # like on a phone. Other than that it
seems a bit senseless.)

/s/ Adam
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Can't run with shared library

2009-12-23 Thread Chasc
On Wed, 2009-12-23 at 12:44 +0100, Christian Kandeler wrote:
 On Wednesday 23 December 2009 12:04:32 ext Chasc wrote:
  On Wed, 2009-12-23 at 10:18 +0100, Christian Kandeler wrote:
   On Wednesday 23 December 2009 00:11:18 ext Chasc wrote:
I have generated a shared library (.so file) and am trying to run an
app I have developed in Qt-creator using the library but so far without
success. Can anybody help me with this or perhaps direct me to the
relevant documentation? My platform is linux.
  
   If I understand you correctly, you want to make your library be linked to
   your application? In that case, add the following to your project (.pro)
   file: LIBS += -Lpath-to-lib -llib-name
   (This is what it looks like for UNIX-like systems; other platforms have
   different syntax, but also use the LIBS variable.)
  
   Christian
   ___
 
  Done that. The app now compiles but when I run it I get:
  symbol lookup error: undefined symbol: _Z6centerP11QMainWindow
  exited with code 127. I was able to compile and run when I had included
  the source code. All I have done is replaced the source code with the
  shared library plus added the LIBS line in the project file. I am still
  using the headers for the library.
 
 Apparently, the dynamic linker cannot find the library. Either copy it to a 
 standard system directory, or add its directory to the LD_LIBRARY_PATH 
 variable. If you intend to exclusively run the application directly from Qt 
 Creator while you're developing it, you can also edit the same variable in 
 the project's runs settings (in the Run Environment part).
 
 Christian
 
I have added it to the LD_LIBRARY_PATH in Qt-Creator's Run Environment
but to no avail so I must be doing something stupid. Thanks for the help
though.

pcor


___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Can't run with shared library

2009-12-23 Thread Chasc
On Thu, 2009-12-24 at 09:07 +1000, Chasc wrote:
 On Wed, 2009-12-23 at 12:44 +0100, Christian Kandeler wrote:
  On Wednesday 23 December 2009 12:04:32 ext Chasc wrote:
   On Wed, 2009-12-23 at 10:18 +0100, Christian Kandeler wrote:
On Wednesday 23 December 2009 00:11:18 ext Chasc wrote:
 I have generated a shared library (.so file) and am trying to run an
 app I have developed in Qt-creator using the library but so far 
 without
 success. Can anybody help me with this or perhaps direct me to the
 relevant documentation? My platform is linux.
   
If I understand you correctly, you want to make your library be linked 
to
your application? In that case, add the following to your project (.pro)
file: LIBS += -Lpath-to-lib -llib-name
(This is what it looks like for UNIX-like systems; other platforms have
different syntax, but also use the LIBS variable.)
   
Christian
___
  
   Done that. The app now compiles but when I run it I get:
   symbol lookup error: undefined symbol: _Z6centerP11QMainWindow
   exited with code 127. I was able to compile and run when I had included
   the source code. All I have done is replaced the source code with the
   shared library plus added the LIBS line in the project file. I am still
   using the headers for the library.
  
  Apparently, the dynamic linker cannot find the library. Either copy it to a 
  standard system directory, or add its directory to the LD_LIBRARY_PATH 
  variable. If you intend to exclusively run the application directly from Qt 
  Creator while you're developing it, you can also edit the same variable in 
  the project's runs settings (in the Run Environment part).
  
  Christian
  
 I have added it to the LD_LIBRARY_PATH in Qt-Creator's Run Environment
 but to no avail so I must be doing something stupid. Thanks for the help
 though.

[A few hours later] Actually, I succeeded in running the app with the
shared library only after I added the library's path to LD_LIBRARY_PATH
in bash and running it on the command line. It appears that Qt-Creator's
Project Settings don't work.

pcor
 
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator
 
 


___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator