what techniques are helpful analyze event driven programs?



  • Hello there,
    until this time I had written some small programs which all had a linear flow control. For planning and analyzing such code the only tool I use is a flow chart.
    Now I will tackle the jump to event-driven programming, therefore I want familaiarizing me with the Qt-framework . But I realize that it's pretty hard for me recognizing the structure of such code and a simple flow chart doesn't fit to this matter. So I would ask to yours, whose are allmost experienced programmers: What tools do you use for analyzing and designing your event-driven code? What reading material do you suggest for the subject?

    Thanks, Nico


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    One tool that's interesting is KDAB's GammaRay.

    As for reading, Qt's Signals & Slots is a good starting point.

    Take the time to go through the documentation, it's pretty complete.

    If you're also interested by QML, the qmlbook.org website is pretty nice.

    Hope it helps



  • GammaRay's capabilities sounding pretty good. Now I'm trying to install it from source.
    At time I struggle with cmake tool: The libraries of my Qt related files wasn't found and i don't know which file i need to configure.


  • Lifetime Qt Champion

    Calling cmake directly or through Qt Creator ?



  • Which file i must open for compiling the project with Qtcreator? I couldn't find a '*.pro' file.
    But now I'm editing the cmake-file with make-gui. There are still three unset variables:

    Qt5Core_DIR,
    QT_PRIVATE_INCLUDE_DIR
    GLSLANG_VALIDATOR_EXECUTABLE

    So I think, if these are correct setten, it will build then fine.


  • Lifetime Qt Champion

    If you're building a cmake based project you won't have a .pro file unless your project supports both build systems.



  • Thanks for this hint. But building with QtCreator is throwing the same errrors. The main thing is that in CMakeList.txt there are some requests for packages which should be installed by the package manager. But I have here my Qt environment installed locally to my home directory, without using a package manager. Therefore, the the package managment says to cmake, there aren't such librarys installed and so cmake refuses the building.

    I haven't much knowledge about cmake, so i will engage me learning more about cmake's facilities, and, maybe, i will being able tweaking the cmake files to my needs.


  • Lifetime Qt Champion

    Was your project configured with cmake before using Qt Creator ?



  • Was your project configured with cmake before using Qt Creator ?

    Did you mean I if I run cmake before I loaded the CMakeLists.cmake into Qt Creator? Surely.

    But now I have installed the repository's Qt packages for my system (*.deb), in spite that's still Qt5.5, and now cmake configures fine.
    Regrettably, "make" threw an error that there is missed a header file: private/qpainterpath_p.h
    So I went to KDAB's homepage and installed its gammaray deb package. Now I'm able to run gammaray.


  • Lifetime Qt Champion

    In that case you have to help cmake find Qt 5. IIRC you can use CMAKE_PREFIX_PATH for that.

    Anyway, glad you could start hacking :)



  • Do you know wich path I need? I have used set(CMAKE_PREFIX_PATH /path/to/Qt/5.7) and it didn't work.


  • Lifetime Qt Champion

    You are missing a level, you have to go to the folder where include is located.



  • @SGaist
    Thank you so much for your helping setting up a brandnew GammaRay install. Now it runs without errors and I'm glad being able to using it with Qt 5.7

    Regards, Nico


  • Lifetime Qt Champion

    You're welcome !

    Happy hacking ! :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.