Jump to content
Tuts 4 You

D1N's Blog

Sign in to follow this  
  • entries
    10
  • comments
    3
  • views
    40,792

Qt4 development and design with NetBeans

Sign in to follow this  
D1N

2,435 views

OK, so like I was saying I needed a crash course in Qt development with C++. I just wanted to let everyone know that the experience is great so far... I actually was a bit nervous about using Qt with my latest project but needed something that would allow me to develop a nice clean looking interface and run smoothly on both LINUX and Windows. I like sharing my various programming learning experiences plus it kinda motivates me to try new things. I had some issues at first configuring NetBeans to include qt headers, compile and build but with a little bit of persistence and some researching I got it! I had to find the correct path for the lib and configure run params in the build configuration. I think one of the most important things here from a development standpoint is the fact that you get to learn multiple devenv and how to cross compile and support your code on multiple operating systems.

The example: A simple button that terminates the application, responds to the user action and well close the program. The example is in chapter 1 of C++ GUI programming with Qt 4, Second Edition

by James Blanchette and Mark Summerfield.

/* 
* File: main.cpp
* Author: d1n
*
* Created on January 20, 2009, 11:03 PM
*/

#include <stdlib.h>
#include <qapplication.h>
#include <qpushbutton.h>
#include <qobject.h>

int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QPushButton *button = new QPushButton("Quit");
QObject::connect(button, SIGNAL(clicked()),
&app, SLOT(quit()));
button->show();
return app.exec();
}

screenshot752.png

If your interested grab qt4 supported on LINUX and WINDOWS. Qt can be found here and NetBeans here

You can find more information about setting up NetBeans with Qt here

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...