Is that possible ? Or the suggested way is to call the Ui from a different, custom class and then play with the variables inside Ui ?
Is that possible ? Or the suggested way is to call the Ui from a different, custom class and then play with the variables inside Ui ?
I've shown in another thread to you how to get access to members in ui.
if you use the first method then all members from ui will be inherited.
if you use the second one then using member m_ui you can get access.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
one way is to access the existing members in the widgets of the UI, but if you want to add more functions to a widget or use a custom widget, you can put a similar placeholder widget in the UI and "promote" it to your custom widget. Heres a post I had not too long ago in the programming thread where I wanted to get the drag and drop functionality out of a QTableWidget that I inserted in a UI file. Since i wanted a custom signal, i needed to put the placeholder and promote it.
Heres the link, it shows code for drag and drop, but you can use the same concept for other widgets/adding other functions.
http://www.qtcentre.org/forum/f-qt-p...ile-17536.html
Cruz (20th January 2009)
Bookmarks