hi,
i spent a load of time in qt3 building a ui file and then sublcassing the resulting generated files to be my main window. the procedure in qt4, however, is throwing me off.
for example, i created test.ui, which (when compiled) generated test.h and test.cpp. i also added functions into test.ui.h, and the class name is called testClass (which is a QMainWindow sublcass).
since i needed more functionality in the class, i subclassed testClass as testSubClass into files testSubClass.cpp and testSubClass.h. in main.cpp, i create an instance of testSubClass which acts as my main window.
so far i have for qt3:
files i created
---------------
test.ui test.ui.h
testSubClass.cpp
testSubClass.h
generated files
---------------------
test.cpp, test.h
and i define my testSubClass as
Qt Code:
class testSubClass : public testClassTo copy to clipboard, switch view to plain text mode
i'm now trying to translate this into qt4's new and confusing ui structure.
so far i have for qt4:
files i created
---------------
test.ui
testSubClass.cpp <--- leftover from qt3 architecture. contains all the functionality
testSubClass.h
generated files
---------------------
ui_test.h
how do i define testSubClass now? is it a testClass subclass or a QMainWindow subclass or both?
where does this new ui.setupUi() go, in main or in testSubClass.cpp in the testSubClass constructor?
when do i use this Ui namespace??
i've read the sparse documentation on making these changes and that's what got me this far, but i'm lost in getting past this.
thanks!! -- lou
Bookmarks