Ok, I'm sorry but I don't understand what you mean by having a base and 2 subclasses...
I have 2 seperate ui files with different styles. The "plain" one contains just the essentials, nothing more than a simple form with no style whats so ever(Other than the style Qt gives to it at run time, based on the OS). Then, I have a "fancy" one which includes the core functions and buttons, etc, but also contains some different actions in the constructor(like setMask()). It also has a different style, like different images, integrated style sheets in Qt Designer, and more.
In my program I want to let the user chose which style he wants. After he chooses, the program restarts, and reads from QSettings what he wants. If it's the fancy style, the program should read the "fancy" ui file and perform extra operations on the main window, in addition to the core commands.
However, if it's plain, then the program should read the "plain" ui file, and only do the core commands.
I received some suggestions from jpn, having setFancyMode() and setPlainMode(), but my question is, how can I transform the application from single-inheritance to multi-inheritance. Ie, I don't want to have to call plainUi.myTextBox, instead calling just myTextBox.
If I create pointers to each object during the setPlainStyle() or setFancyStyle() functions, do I have to somehow globally declare them in the header file, or will they be globally defined already for use in other functions of the same class?
Thanks a lot so far, I think I'm not getting it because I'm kinda new and need more explanation than a normal coder wouldSo again, thanks for all this help, this forum is the best I've been on
![]()
Bookmarks