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

Qt-interest Archive, February 2007
qt project on windows and mac


Message 1 in thread

Hello,

We've just started evaluating QT here and have created a very small app 
using VS2005 on Windows.  It has a QMainWindow with a QPushButton on it 
that pops up a hello world QMessageBox.  This all works fine within 
VS2005 - builds and runs ok.

We are also interested in running on the Mac.  We exported the VS 
project using the menu option 'Qt -> Create Basic .PRO file' and then 
used qmake on the Mac to generate a XCode project.  That all seemed to 
work ok - can load the project up into Xcode.  When we try to build it 
on the Mac we get an error;

 >> Running custom shell script (1 error)
 >> /Developer/Tools/Qt/rcc -name hw_mainwindow hw_maindindow.qrc -o 
GeneratedFiles/qrc_hw_mainwindow.cpp
 >> RCC Warning: No resources in resource description
 >> make: *** [GeneratedFiles/qrc_hw_mainwindow.cpp] Error 1

Can anybody shed some light on this?  The only resource that I can think 
that might be in the project is a program icon?  AFAIK the form itself 
is turned into C++ code?

Thanks!

Peter Lee

-- 
 [ signature omitted ] 

Message 2 in thread

On Wednesday 14 February 2007 12:49, Peter Lee wrote:
> When we try to build it on the Mac we get an error;
>
>  >> Running custom shell script (1 error)
>  >> /Developer/Tools/Qt/rcc -name hw_mainwindow hw_maindindow.qrc -o
>
> GeneratedFiles/qrc_hw_mainwindow.cpp
>
>  >> RCC Warning: No resources in resource description
>  >> make: *** [GeneratedFiles/qrc_hw_mainwindow.cpp] Error 1
>
> Can anybody shed some light on this?  The only resource that I can think
> that might be in the project is a program icon?  AFAIK the form itself
> is turned into C++ code?

Sounds like the VS2005 integration created a resource file even though it 
seems you haven't explicitly added any. If you comment out 
RESOURCES+=hw_mainwindow.qrc in your .pro file, does it work?

-- 
 [ signature omitted ] 

Message 3 in thread

Hi Peter,

(Moved back to qt-interest)

On Wednesday 14 February 2007 14:50, Peter Lee wrote:
> Bradley T Hughes wrote:
> > If you comment out RESOURCES+=hw_mainwindow.qrc in your .pro file, does it 
> > work? 
>
> That line was actually in the .pri file - I commented it out and it
> worked fine - thanks!

Glad it was that simple. :)

-- 
 [ signature omitted ] 

Message 4 in thread

> On Wednesday 14 February 2007 12:49, Peter Lee wrote:
> > When we try to build it on the Mac we get an error;
> >
> >  >> Running custom shell script (1 error)  >> 
> /Developer/Tools/Qt/rcc 
> > -name hw_mainwindow hw_maindindow.qrc -o
> >
> > GeneratedFiles/qrc_hw_mainwindow.cpp
> >
> >  >> RCC Warning: No resources in resource description  >> make: *** 
> > [GeneratedFiles/qrc_hw_mainwindow.cpp] Error 1
> >
> > Can anybody shed some light on this?  The only resource that I can 
> > think that might be in the project is a program icon?  
> AFAIK the form 
> > itself is turned into C++ code?
> 
> Sounds like the VS2005 integration created a resource file 
> even though it seems you haven't explicitly added any. If you 
> comment out 
> RESOURCES+=hw_mainwindow.qrc in your .pro file, does it work?

Probably a better solution is to scope this line in your .pro file like
this:

win32 {
  RESOURCES+=hw_mainwindow.qrc
}

That way when you build on Windows it will still include this Windows
resource.

Sean

--
 [ signature omitted ]