Results 1 to 2 of 2

Thread: QUiLoader's method “load” used in custom widget results in “Segmentation fault” in Li

  1. #1
    Join Date
    Aug 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QUiLoader's method “load” used in custom widget results in “Segmentation fault” in Li

    I'm writing an interface program for Linux Debian 6 and it came time to internationalize it, so I started reading the Qt Documentation. I was happy to see that all forms loaded by QUiLoader are automatically translated, but I stumbled on a problem. Almost the whole interface consists of custom widgets that are put in the forms from designer. Some of them use their own forms that they load using QUiLoader class and here the problem appeared. When I start Linguist and choose a translation that is located on a form that uses some of my custom widgets the program ends with "Segmentation Fault". I put a lot of prints to see where Linguist dies and I fount that when I invoke the method "load" from class QUiLoader with valid ui file the application dies. If the file isn't valid it doesn't die. I'm not sure if this is a bug or not so I'm posting it here.

    I made a simple example showing the problem.

    Download it: http://www.filefactory.com/file/cc52b9f/n/DEMO4_zip

    P.P. I forgot to mention that I use Qt 4.7.0 because it comes with SDK that is compiled with the same version. I tried using the new one but in my custom widgets I use things like SQL and OpenGL and some more and designer complains that cannot mix 4.7.1/4.7.2/4.7.3 with 4.7.4. I can work around the problem with the environment variable LD_PRELOAD but it I don't like this solution.

    It will be helpful and if you tell me where I can find help for my problem.

    Edit: If someone confirmed the problem exists please write to be sure that it's not just me.
    Last edited by mazzzterz; 15th July 2011 at 13:24.

  2. #2
    Join Date
    Aug 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QUiLoader's method “load” used in custom widget results in “Segmentation fault” i

    In future if someone else is in need:
    http://lists.qt.nokia.com/pipermail/...ly/034969.html

Similar Threads

  1. Replies: 1
    Last Post: 18th July 2012, 09:59
  2. Replies: 1
    Last Post: 15th November 2011, 23:10
  3. undefined reference to `QUiLoader::QUiLoader(QObject*)'
    By ashukla in forum Qt Programming
    Replies: 7
    Last Post: 7th October 2011, 18:05
  4. Weird results when passing a QByteArray* to a method
    By agerlach in forum Qt Programming
    Replies: 1
    Last Post: 1st December 2010, 22:05
  5. Replies: 1
    Last Post: 26th January 2007, 07:10

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.