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:
QFile file("sortdialog.ui");
QWidget *sortDialog
= uiLoader.
load(&file
);
sortDialog->show();
QUiLoader uiLoader;
QFile file("sortdialog.ui");
QWidget *sortDialog = uiLoader.load(&file);
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.
SortDialog* b = new SortDialog();
b->show();
SortDialog* b = new SortDialog();
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:
# -------------------------------------------------
# Project created by QtCreator 2009-05-10T10:15:55
# -------------------------------------------------
TARGET = Demo
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp \
sortdialog.cpp
HEADERS += mainwindow.h \
sortdialog.h
FORMS += mainwindow.ui \
sortdialog.ui
CONFIG += uitools
# -------------------------------------------------
# Project created by QtCreator 2009-05-10T10:15:55
# -------------------------------------------------
TARGET = Demo
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp \
sortdialog.cpp
HEADERS += mainwindow.h \
sortdialog.h
FORMS += mainwindow.ui \
sortdialog.ui
CONFIG += uitools
To copy to clipboard, switch view to plain text mode
Oh and coding under Windows 7.
Bookmarks