Results 1 to 1 of 1

Thread: Qt Learning... Strange error.

  1. #1

    Default Qt Learning... Strange error.

    Ok sort of learning Qt. I have a solid experience in C++ just that never used before Qt. I am just at the part that I can also load dynamically at run-time the ui files. With the following code snippet:


    Qt Code:
    1. QUiLoader uiLoader;
    2. QFile file("sortdialog.ui");
    3. QWidget *sortDialog = uiLoader.load(&file);
    4. sortDialog->show();
    To copy to clipboard, switch view to plain text mode 
    The problem is that I get the error:
    : ld returned 1 exit status

    Even though as I made all this as a class form the following road works just fine.

    Qt Code:
    1. SortDialog* b = new SortDialog();
    2. b->show();
    To copy to clipboard, switch view to plain text mode 

    What am I missing here ?

    PS. I am using Qt Creator 1.1.0 with Qt 4.5.1
    And my project file is:
    Qt Code:
    1. # -------------------------------------------------
    2. # Project created by QtCreator 2009-05-10T10:15:55
    3. # -------------------------------------------------
    4. TARGET = Demo
    5. TEMPLATE = app
    6. SOURCES += main.cpp \
    7. mainwindow.cpp \
    8. sortdialog.cpp
    9. HEADERS += mainwindow.h \
    10. sortdialog.h
    11. FORMS += mainwindow.ui \
    12. sortdialog.ui
    13. CONFIG += uitools
    To copy to clipboard, switch view to plain text mode 

    Oh and coding under Windows 7.
    Last edited by jokerjokerer; 10th May 2009 at 09:21.

Similar Threads

  1. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  3. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31

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.