Project

General

Profile

Qt Project file example for wthome example

Added by Jeff Flesher over 12 years ago

Can you add this file wthome.pro to your wthome examples root, it would make life much easier for people wanting to work in Qt Creator. I might be linking in more then I need, but it was what I needed, but finding what I needed to link in wasn't easy, but this runs for me; its nice to have project files, those that use Qt Creator IDE feel at home and it works very well, people are always asking about an IDE, granted not all features work, so it might be misleading, you can not use the IDE to build the interface, so it has limitations worth noting, but its still worth using, I never use those drag and drop design windows anyway and use a text editor most of the time, but I like Qt Creator with Wt, it helps me visualize the layout and I make use of most other features; just add:

---docroot . ---http-address 0.0.0.0 ---http-port 8080

to your run Arguments and open localhost:8080 in your browser and you can debug it; but the lack of this support file in the examples is a shame, people are missing out of the whole IDE experience, which is to make debugging easier, and Qt does that, but that's my two cents.

Thanks

add ---docroot . ---http-address 0.0.0.0 ---http-port 8080 to run arguments.

saveas wthome.pro in root

QT       += core
QT       -= gui
QT       += sql
TARGET = wthome
LIBS += -L/usr/lib  -lwt -lwthttp -lwtdbosqlite3 -lwtdbo -lcrypt -I/usr/local/include -lboost_signals -lboost_filesystem -lboost_system -lboost_regex -lboost_date_time -lboost_thread
QMAKE_CXXFLAGS += -DNDEBUG
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app

SOURCES += JWtHome.C ExampleSourceViewer.C FileItem.C Home.C SourceView.C WtHome.C main.C BlogRSSFeed.C \
            model/BlogSession.C model/BlogUserDatabase.C model/Comment.C model/Post.C model/Tag.C model/Token.C model/User.C \
            view/BlogLoginWidget.C view/BlogView.C view/CommentView.C view/EditUsers.C view/PostView.C \
            asciidoc/asciidoc.C
HEADERS  += JWtHome.h ExampleSourceViewer.h FileItem.h Home.h SourceView.h WtHome.h BlogRSSFeed.h \
            model/BlogSession.h model/BlogUserDatabase.h model/Comment.h model/Post.h model/Tag.h model/Token.h model/User.h \
            view/BlogLoginWidget.h view/BlogView.h view/CommentView.h view/EditUsers.h view/PostView.h \
            asciidoc/asciidoc.h

OTHER_FILES += \
    wt-home.xml \
    wt-home_cn.xml \
    wt-home_ru.xml \
    jwt-home.xml

Replies (3)

RE: Qt Project file example for wthome example - Added by Jeff Flesher over 12 years ago

Update: I forgot I copied in the Blog project so the relative path was wrong for the blog files, I fixed the relative path in this file to work with the Examples folders.

Should I fork this and send you a patch (if so where do I fork it? From http://www.webtoolkit.eu/git/wt.git to I have a github.com account?), how can I contribute this and other code?

QT       += core
QT       -= gui
QT       += sql
TARGET = wt-home
LIBS += -L/usr/lib  -lwt -lwthttp -lwtdbosqlite3 -lwtdbo -lcrypt -I/usr/local/include -lboost_signals -lboost_filesystem -lboost_system -lboost_regex -lboost_date_time -lboost_thread
QMAKE_CXXFLAGS += -DNDEBUG
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += JWtHome.C ExampleSourceViewer.C FileItem.C Home.C SourceView.C WtHome.C main.C  \
            model/BlogSession.C model/BlogUserDatabase.C model/Comment.C model/Post.C model/Tag.C model/Token.C model/User.C \
            view/BlogLoginWidget.C view/BlogView.C view/CommentView.C view/EditUsers.C view/PostView.C \
            ../blog/BlogRSSFeed.C ../blog/asciidoc/asciidoc.C \
HEADERS  += JWtHome.h ExampleSourceViewer.h FileItem.h Home.h SourceView.h WtHome.h \
            model/BlogSession.h model/BlogUserDatabase.h model/Comment.h model/Post.h model/Tag.h model/Token.h model/User.h \
            view/BlogLoginWidget.h view/BlogView.h view/CommentView.h view/EditUsers.h view/PostView.h \
            ../blog/BlogRSSFeed.h ../blog/asciidoc/asciidoc.h

OTHER_FILES += \
    wt-home.xml \
    wt-home_cn.xml \
    wt-home_ru.xml \
    jwt-home.xml

RE: Qt Project file example for wthome example - Added by Jeff Flesher over 12 years ago

Update: Sorry about that; it seems I missed the blog model and views, now its right, I think that's why I moved them in the first place, but for the Examples its best to keep it as it is.

What I would want to do is get a project file for each example, and an overall project file, but I know that will require a few more details then just the project file, so I'll document the process.

This is just a bad way to do this; an Article would be much better,

so the real question is where is the best place to post Articles, Tutorials and Projects related to Wt?

QT       += core
QT       -= gui
QT       += sql
TARGET = wt-home
LIBS += -L/usr/lib  -lwt -lwthttp -lwtdbosqlite3 -lwtdbo -lcrypt -I/usr/local/include -lboost_signals -lboost_filesystem -lboost_system -lboost_regex -lboost_date_time -lboost_thread
QMAKE_CXXFLAGS += -DNDEBUG
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += JWtHome.C ExampleSourceViewer.C FileItem.C Home.C SourceView.C WtHome.C main.C  \
            ../blog/model/BlogSession.C ../blog/model/BlogUserDatabase.C ../blog/model/Comment.C \
            ../blog/model/Post.C ../blog/model/Tag.C ../blog/model/Token.C ../blog/model/User.C \
            ../blog/view/BlogLoginWidget.C ../blog/view/BlogView.C ../blog/view/CommentView.C \
            ../blog/view/EditUsers.C ../blog/view/PostView.C \
            ../blog/BlogRSSFeed.C ../blog/asciidoc/asciidoc.C \
HEADERS  += JWtHome.h ExampleSourceViewer.h FileItem.h Home.h SourceView.h WtHome.h \
            ../blog/model/BlogSession.h ../blog/model/BlogUserDatabase.h ../blog/model/Comment.h \
            ../blog/model/Post.h ../blog/model/Tag.h ../blog/model/Token.h ../blog/model/User.h \
            ../blog/view/BlogLoginWidget.h ../blog/view/BlogView.h ../blog/view/CommentView.h \
            ../blog/view/EditUsers.h ../blog/view/PostView.h \
            ../blog/BlogRSSFeed.h ../blog/asciidoc/asciidoc.h

OTHER_FILES += \
    wt-home.xml \
    wt-home_cn.xml \
    wt-home_ru.xml \
    jwt-home.xml

RE: Qt Project file example for wthome example - Added by Koen Deforche over 12 years ago

Hey,

I agree that this kind of information has a place as an article, blog or wiki entry.

Feel free to use any kind of place to post and add a link from within the wiki:

http://redmine.emweb.be/projects/wt/wiki

You may also author your content directly in the wiki, if you prefer.

Thanks !

Regards,

koen

    (1-3/3)