Linking OF into QTcreator (GUI creation)
1 Attachment(s)
Dear all,
I am currently having a small side project, where I would like to make a small GUI for OpenFoam. I have started in QTCreator, and it is surprisingly easy to get somewhere. Though, I have run into a problem. I would like to use the IO functionality present in OF to read OF-dictionaries, so I do not have to write this entire IO-class again. As a starting point I simply included IOstream.H in the header-file of the QT-project and I got the following error: Code:
p, li { white-space: pre-wrap; } In file included from ../debug/mainwindow.h:5:0, Code:
INCLUDEPATH += /home/ngja/foam/foam-extend-3.1/src/foam/lnInclude I have checked and scalar.H is located in the same include directory as vector.H and IOstream.H. Has anyone tried anything similar? What is it with the declaration of scalar that makes this difficult? I have added a tiny debug-project for QTCreator. Thank you for any advice or shared experiences, Kind regards, Niels |
Dear all,
I am now back at this issue and I seem to have found the error (at least it now compiles, but I have not yet had time to implement what I want). It is very simple. QtCreator creates a file with various settings (*.pro) and this line is needed: Code:
DEFINES += WM_DP Code:
#if defined(WM_SP) Kind regards, Niels |
Hi ngj,
Nice project there :). I just started on a similar project to read, write and explore dictionary files for a particular case (so basically a case manager). I have a few questions if you have some time to answer. 1. I just went through the hexBlocker source code and observed that you are not using any of the openfoam classes. Any specific reasons or you found Qt IO classes to be adequate for your application. 2. I tried including the header files in the my Qt application. File inclusion is working fine but Qt does not seem to resolve the system environment variables which are used in some of the OF header files (WM_* variables). So my build fails. I tried adding the variable manually to the build environment but still it does not resolve them. Do you face similar problem anytime? Thanks and Best regards, khedar |
Hi Khedar,
I never got any further with my GUI project, so I cannot be of any help. Please note that I did not develop hexBlocker, so you might direct your first question somewhere else. Kind regards Niels |
Hi Niels,
Sorry :o I mixed up. Anyways I was able to do the linking. I will try to make the GUI now. Thanks, Khedar |
All times are GMT -4. The time now is 03:19. |