Is there way to use QT Designer UI forms so you get direct access to the form widgets in your program?
-
What if I have to go the other way around? - click a button on a widget and do some backend stuff. Also as you probably figured out I'm a newbie to all this stuff. I have a background in data structures and basic programming and inheritance etc... - I'm basically an intermediate level programmer. Can you recommend any books or tutorials to help me out with this scenario of backend vs fronted and ui forms specifcally QT? Thanks :)
-
Same principle:
void MyCoolWidget::setupBackend(MyCoolBackend *backend) { connect(backend, &MyCoolBackend::stringBasedSignal, ui->statusLabel, &QLabel::setText); connect(ui->startButton, &QPushButton::clicked, backend, &MyCoolBackend::igniteToaster); // etc. }
This book might be of interest. Look for the parts about the Façade pattern.
-
@Crag_Hack
Hi
When i started with Qt, i like to browse around in this one
http://www.bogotobogo.com/cplusplus/files/c-gui-programming-with-qt-4-2ndedition.pdf
I find it goes well with Qt docs to learn about different classes and ways to structure the app. -
What kind of special cool looking buttons do you have in mind ?
-
For the first one I'd recommend going with QtQuick, that will be easier to build. The second can be accomplished with widgets with some styling but again, you'll likely be faster with QtQuick to do it.
-
I'd rather not use QT Quick unless it's necessary because I'm not familiar with it. Maybe I should bite the bullet and learn it... With widgets though do those books teach you how to do gradients / style sheets / icons and graphics etc so you can make great looking programs? Also if QT Quick is super easier and more effective can I integrate with my C++ backend?