Results 1 to 4 of 4

Thread: Build problems

  1. #1
    Join Date
    Feb 2006
    Posts
    42
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Build problems

    I have written a sample that uses a .bmp file as its back ground image. Image's size is almost 2.0 MB. I have specified it in ".qrc" file. But while building the sample, particularly compiling the qrc_sample.cpp it hangs and build process is never completed. Here is the code I have written,

    QPixmap pixmap;
    pixmap.load("images/fully.bmp");
    palette.setBrush((this)->backgroundRole(), QBrush(pixmap));
    (this)->setPalette(palette);

    // here is the listing in sample.qrc
    <file>images/fully.bmp</file>

    Is their any limitation on the size of files that are used in qrc or its a bug ? Is their any work around possible ? I just tweaked into qrc_sample.cpp and it was around 1,32,685 lines. Am I doing anything wrong here?
    Thanks in advance,
    Seema Rao

  2. #2
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Build problems

    Are you sure your .qrc file is in the good directory ?

    It should be like this :

    qrc_sample.qrc
    qrc_sample.cpp <generated by compiler>
    images/
    |_ fully.bmp

    By the way, in your code..to load the pixmap from resource, you have to do like this :
    pixmap.load(":/images/fully.bmp");

    Don't forget the ':/' before the path !

    Guilugi.

  3. #3
    Join Date
    Feb 2006
    Posts
    42
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Build problems

    Hi I tried the way you have indicated but It still hangs both on Linux and Mac. I dont know why? here is the compilation row,

    /usr/local/Trolltech/Qt-4.0.1/bin/rcc -name menus sample.qrc -o qrc_sample.cpp
    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.0.1/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.0.1/include/QtGui -I/usr/local/Trolltech/Qt-4.0.1/include/QtCore -I/usr/local/Trolltech/Qt-4.0.1/include -I. -I. -I. -o qrc_sample.o qrc_sample.cpp

    It hangs here ---

  4. #4
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Build problems

    It is probably not hanging but taking too long to compile 1,32,685 lines of code.
    Why dont you convert the bmp to png and then try.

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 06:27
  2. QWT fails in debug build
    By steg90 in forum Qwt
    Replies: 1
    Last Post: 11th November 2011, 06:53
  3. Qt Creator 0.9.1 - progrma build error
    By fb2007 in forum Installation and Deployment
    Replies: 5
    Last Post: 18th October 2009, 16:02
  4. Problems with static build
    By KaptainKarl in forum Installation and Deployment
    Replies: 2
    Last Post: 22nd August 2007, 10:46
  5. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 13:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.