Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[QT4] Variables in .ui file
Paddre last edited by
my current task at work is to port a quite complex program (with over 40 classes) from Qt 3 to Qt 4.
The project contains several QDialogs, which have been created using Qt Creator.
To explain my question easier, I take a QDialog as an example (let's call it dialog ;-) ).
dialog.ui (Qt3) contains several <variable> tags (<variable access="public">int temp;</variable>).
UIC builds the file dialog.h which contains these variables as public members of class dialog.
Afaik these <variable> tags are no longer supported in Qt 4.
Since there are many classes which use these public members, I wonder if there is a possibility to get them into the Qt4 - dialog.ui so that UIC declares them in ui_dialog.h.
The only alternative I can imagine is to implement a class that inherits Ui_dialog and declares the missing members. But I want to avoid this way
Do you have an idea how I can solve it?
Hi and welcome to devnet,
You can find "here":http://qt-project.org/doc/qt-4.8/porting4-designer.html a guide to post Qt 3 UI files to Qt 4.
You might also want to consider going with Qt 5 directly
Hope it helps