Author Topic: QtWorkbench plugin  (Read 231996 times)

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #195 on: March 28, 2008, 11:07:54 am »
Hi, thanks for your support and interest.
Providing a template for creating QtWorkbench projects is on my TODO list (actually it is ready) but unfortunately:
  • There is no way to add it to the list of project/target templates in C::B except manually changing a file
  • The behavior of C::B when creating the new project using the template was a bit strange (it was signaling more than one times that the new project was created) and it messed up a bit the way the project was setup
Anyway this is something that I have on my mind so you 'll eventually get it :-)

The Qt4 project template that is bundled with C::B is insufficient for creating a full blown Qt application and cannot be considered useful. GeeF already mentioned the reasons.

ui_*.h and moc_*.h files have no reason for being included in your project files as they are automatically generated. C::B provides facilities for performing custom compilation steps per file type and include them in your project files in order to participate to the build process. I haven't checked that yet but it seems that this could be another solution for building Qt projects and probably more "native" to the C::B build process. I think that if someone checks it out and proposes things Yiannis will be more than happy to take a look at them. This facility was originally meant for adding support for non C++ files to the build process but it can evolve I guess.
Life would be so much easier if we could just look at the source code.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: QtWorkbench plugin
« Reply #196 on: March 28, 2008, 03:04:08 pm »
ui_*.h and moc_*.h files have no reason for being included in your project files as they are automatically generated. C::B provides facilities for performing custom compilation steps per file type and include them in your project files in order to participate to the build process. I haven't checked that yet but it seems that this could be another solution for building Qt projects and probably more "native" to the C::B build process. I think that if someone checks it out and proposes things Yiannis will be more than happy to take a look at them. This facility was originally meant for adding support for non C++ files to the build process but it can evolve I guess.

Yes, it will improve. Its current major drawback is that these settings are compiler-global, (i.e. you must manually configure your C::B installation for these) while they should be per-project/target settings.
Be patient!
This bug will be fixed soon...

Omni

  • Guest
Re: QtWorkbench plugin
« Reply #197 on: April 06, 2008, 03:12:36 am »
The Code::Blocks project file of the qtWorkbench plugin doesn't correctly use the global variable "cb"
the search paths have the form

$(#cb)/include
$(#cb)/include/wxscintilla/include

but should look like this for greater compatibility

$(#cb.include)
$(#cb.include)/wxscintilla/include


Offline Revvy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: QtWorkbench plugin
« Reply #198 on: April 06, 2008, 06:53:39 pm »
I really like how this plugin is working so well, but I have one problem after following the wiki pages.  My project gets this error when I try to build:

make.exe: *** No rule to make target `..\..\Qt\4.3.3\mkspecs\default\qmake.conf', needed by `Makefile.Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

Can you prepare a minimal project that reproduces this issue and upload it in the bug tracker?

Done.
Cheers,
Revvy

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #199 on: April 07, 2008, 01:58:21 pm »
Done.
Thanks

The Code::Blocks project file of the qtWorkbench plugin doesn't correctly use the global variable "cb"
the search paths have the form

$(#cb)/include
$(#cb)/include/wxscintilla/include

but should look like this for greater compatibility

$(#cb.include)
$(#cb.include)/wxscintilla/include

Thanks I 'll prepare that
Life would be so much easier if we could just look at the source code.

Offline noisy.pl

  • Single posting newcomer
  • *
  • Posts: 4
Re: QtWorkbench plugin
« Reply #200 on: April 22, 2008, 08:55:04 pm »
...
I have problem with this plugin too...but I use new CB8.02.

I am wondering when will be released plugin to new CB...

Shortly ;-)

its mean?

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #201 on: April 23, 2008, 09:31:16 am »
Current version works happily with cb 8.02
Life would be so much easier if we could just look at the source code.

dandy

  • Guest
Re: QtWorkbench plugin
« Reply #202 on: April 30, 2008, 04:59:12 pm »
Hello,
It's probably something silly but after following the instructions in Google-wiki, I still can't build the example complexdialog project.

Error message:
    "Execution of 'make.exe -f Makefile complexwizard' in 'C:\Cpp\dialogs' failed."

I'm using:
Code::Blocks 8.02 (Windows)
QtWorkbench-0.6.0_alpha.cbplugin
qt4.3.4

Any ideas?

Thanks!

Offline wildcart

  • Single posting newcomer
  • *
  • Posts: 3
Re: QtWorkbench plugin
« Reply #203 on: May 01, 2008, 08:55:05 pm »
Hi...

I have a small problem using qtworkbench on windows (codeblocks is setup to use mingw). When I add additional libraries to my project and then compile the project, the compilation breaks complaining that the libraries could not be found. The reason is that for some reason the '\' in the path is not replaced by a '/'. This is done for all other paths when qmake creates the Makefile based on the .pro file. Since qmake creates the 'faulty' Makefile, I am not really sure if this i a bug in qmake or qtworkbench. I am using qt-4.3.1 at the moment.

How to reproduce:
Project->build options->Search directories->linker
add a directories containing some dll
Project->build options->Linker settings
add some DLL base name.
OR
Porject->build options->Linker settings
add static library with absolute / relative path

Parts of my .pro file:
Code
LIBS += -L"E:\programs\devel\GnuWin32\bin" -L"E:\programs\lib\FTGL-2.1.2\win32_vcpp\Build" -lfreetype6 -lftgl_dynamic_MT
INCLUDEPATH += E:\programs\lib\FTGL-2.1.2\include E:\programs\devel\GnuWin32\include E:\programs\devel\GnuWin32\include\freetype2

Parts of the resulting Makefile:
Code
INCPATH       = -I'e:/programs/lib/qt/4.3.1/include/QtCore' -I'e:/programs/lib/qt/4.3.1/include/QtCore' -I'e:/programs/lib/qt/4.3.1/include/QtGui' -I'e:/programs/lib/qt/4.3.1/include/QtGui' -I'e:/programs/lib/qt/4.3.1/include/QtOpenGL' -I'e:/programs/lib/qt/4.3.1/include/QtOpenGL' -I'e:/programs/lib/qt/4.3.1/include/QtXml' -I'e:/programs/lib/qt/4.3.1/include/QtXml' -I'e:/programs/lib/qt/4.3.1/include' -I'e:/programs/lib/FTGL-2.1.2/include' -I'e:/programs/devel/GnuWin32/include' -I'e:/programs/devel/GnuWin32/include/freetype2' -I'e:/programs/lib/qt/4.3.1/include/ActiveQt' -I'debug' -I'.' -I'e:/programs/lib/qt/4.3.1/mkspecs/default'
LIBS        =        -L'e:/programs/lib/qt/4.3.1/lib' -lopengl32 -lglu32 -lgdi32 -luser32 -LE:\programs\devel\GnuWin32\bin -LE:\programs\lib\FTGL-2.1.2\win32_vcpp\Build -lfreetype6 -lftgl_dynamic_MT -lQtXmld4 -lQtOpenGLd4 -lQtGuid4 -lQtCored4

Only the paths I added to 'Project build options->Search directories->Linker' (LIBS) are not converted from '\' to '/'. Paths I added to 'Search directories->Compiler' (INCLUDEPATH) are converted.


When I edit the makefile by hand, replacing all '\' by '/', and then call make from the command line (cmd.exe) it works. In the .pro file all paths contain '\' while in the Makefile all paths are converted to '/'. For some reason this is not done for a paths in the LIBS variable. qmake doesn't touch those paths at all, if I write '/' in the .pro file then it will be '/' in the Makefile, also. At the moment, it looks like a bug in qmake. On the other hand I didn't really looked at how qmake's is supposed to treat '/' vs. '\'.


I fixed this problem by hacking 'qtwprogenerator.cpp:425'. Instead of using UnixFilename(wxString) to replace the separator according to the platform (*nix/windows), I added the following lines:
Code
wxString out = opts[x];
out.Replace(_T("\\"), _T("/"), true);


Other than this, version 0.6 of qtworkbench is working great...
 

thnx
  Chriss

Offline rododox

  • Single posting newcomer
  • *
  • Posts: 7
Re: QtWorkbench plugin
« Reply #204 on: May 07, 2008, 09:51:14 pm »
Hi!

Today i have decided to add this plugin to codeblocks (i'm using 8.02 with winXP)

but the "Qt Workbench" tab in the "Project->Properties" are disabled and i can't choose any option from it!!!

Is it a bug :evil:? or i just dont know how to use the plugin? :oops:

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #205 on: May 07, 2008, 10:58:17 pm »
@rododox Resize the window, some options are hidden (it's a bug). Check the "Using QtWorkbench" check box and you 'll be ready to go.

@wildcart I 've added this: http://code.google.com/p/qtworkbench/issues/detail?id=13

@dandy Try from the command line. Maybe make.exe is not in your path?
« Last Edit: May 07, 2008, 11:04:26 pm by yop »
Life would be so much easier if we could just look at the source code.

Offline wildcart

  • Single posting newcomer
  • *
  • Posts: 3
Re: QtWorkbench plugin
« Reply #206 on: May 14, 2008, 07:39:06 pm »
Hi,

I tried to use code::blocks' global variables in my windows project, adding $(#var.include) to 'Build Options -> Search Directories -> ...'.  When I try to compile the project I get the following error:
Code
Makefile.ASDViewer.Release:15: *** unterminated variable reference.  Stop.

So the question is: Does qtworkbench support code::blocks global variables?


Some more information:
In qmake's project file the variables are not resolved instead the include line looks like this:
Code
INCLUDEPATH += E:\MinGW\include $(#ft.include) $(#ft.include)\freetyp2 $(#ftgl.include)

and the offending line in the created Makefile is (line breaks are inserted for readability), note the -I"$(":
Code
INCPATH       = -I"..\..\..\lib\QT\4.4.0\include\QtCore" 
-I"..\..\..\lib\QT\4.4.0\include\QtCore"
-I"..\..\..\lib\QT\4.4.0\include\QtGui"
-I"..\..\..\lib\QT\4.4.0\include\QtGui"
-I"..\..\..\lib\QT\4.4.0\include\QtOpenGL"
-I"..\..\..\lib\QT\4.4.0\include\QtOpenGL"
-I"..\..\..\lib\QT\4.4.0\include\QtXml"
-I"..\..\..\lib\QT\4.4.0\include\QtXml"
-I"..\..\..\lib\QT\4.4.0\include"
-I"..\..\..\MinGW\include"
-I"$("
-I"e:\lib\QT\4.4.0\include\ActiveQt"
-I"..\asdviewer\obj"
-I"..\asdviewer\obj"
-I"..\..\..\lib\QT\4.4.0\mkspecs\default"



Two more things:
1) If global variables are not yet supported I can try to take a look at it.
2) Is this the right place to ask these questions or should I go to
Quote
http://code.google.com/p/qtworkbench/issues/list

regards
  Chriss

Offline RT200

  • Single posting newcomer
  • *
  • Posts: 5
Re: QtWorkbench plugin
« Reply #207 on: October 12, 2008, 10:36:47 am »
Looks like this plugin has been orphaned :(  Is there anyone who can maintain it?

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #208 on: October 13, 2008, 11:40:18 am »
It's not orphaned. It's just not in my immediate priorities. In any case if someone wants to step in he 's more than welcome :-)
Life would be so much easier if we could just look at the source code.

Offline RT200

  • Single posting newcomer
  • *
  • Posts: 5
Re: QtWorkbench plugin
« Reply #209 on: October 13, 2008, 10:03:10 pm »
I was worring about potential problems - what if some changes in C::B broke this plugins? But since you still keep eye on it is ok ;)

P.S. Thx for QtWorkBench, it makes my life more easy.