I recently jumped balls deep into Qt and converted one of my old applications to use this fantastic library. I successfully converted the core (this was extremely enjoyable and actually cut the code down drastically), but im having some issues with the UI side of things. This application has a lot of widgets and menu items involved, so i decided to try out Qt's creator instead of building it completely by hand; im more than capable of doing this as i did it once already (Win32 API), it would just take a huge amount of time (as apposed to 5 minutes in the creator).
I built the UI using the creator and im pretty content with it, hell i even upgraded the look since i dont have to build it by hand, the only problem that i can see is handling events. I've read all about the signal and slots mechanism and also some stuff pertaining to events. The signal/slot editor is of no use to me at all as it only does trivial things like pasting text from the clipboard to a QPlainTextEdit widget, or closing the application when a button is pressed. What im looking to do is a bit more advanced (well at the very least, wont suffice with basic general instructions like copy/paste). Here's what my application needs to do (i have the core and the UI form all done, just gotta link them):
- A user presses a button (convert button).
- Fetch text from a QPlainTextEdit and store it in a QString.
- Create a "Convert" object (no default ctor- it takes a QString containing data to convert, and gets it ready for parsing).
- Fetch options related to the parse (QRadioButtons/Menu items).
- Call my parse member function passing said options as parameters. This returns a QString object containing the new format that was converted.
- Set the main QPlainTextEdit's text using the newly formatted data.
- Fetch text from a QPlainTextEdit and store it in a QString.
If i cant do this using the Qt creator, why the hell does it even exist? I like that it saves TONS of time when creating advanced UI's, but i kind of need my program to...well...function!
So, do i need to write this UI by hand? If so, thats kind of a downer lol. Any help is appreciated (im new to Qt, and i cant really find much stuff relating to this topic (well using the creator)).