I'm new here, sorry if I'm posting in the wrong subforum.
We are making a programming project at school which should be made with c++ and GUI. I chose a 1on1 Poker game. The code is Object-oriented and everything looks to work fine. I haven't begun with hand evaluation yet, because I thought it would be great to see if everything works fine.
My problem is that I can't seem to find a way that the GUI and c++ code will work together. I've made a tester.cpp where betting, shuffling, dealing and so on works fine. When I move on to Qt I don't know how to make the show/response work with the code. I thought this would be solved by making a loop in Qt where Console input in C++, would be represented by QUI input and so on.
My teacher told me it would work without a loop in the GUI and that the game probably should loop in the c++ code. If I make a loop in the c++ code I struggle with understanding how show/response would work in the GUI.
Most GUI apps are controlled differently from the perspective of console apps.
Think about the functions you want to accomplish. For example you want to have a menu or button with an action that Might start a new game. On that action you might Shuffle the deck and deal the cards.
The Data Members would be stored in a convenient place so all functions that reacted on an User action could see them. Since I don't know how you want to design your app I can't elaborate on this. I only have a rough idea how I might control the parts of a poker game in a game window. Usually the data would be in the main window sub class, so the drawing function could update the window with the correct state of the data when ever a refresh goes by.
I would start with some basic tutorials on Qt or other gui sub systems to get the feel of how gui apps are created and how GUI ethics flow. Programming them isn't hard it just takes more planning and understanding of GUI stuff to make things work out.