Jun 22 2011, 11:53 PM
Is anyone interested in me doing a serious tutorial on how to create a functional application in Qt4 from the ground up? Vote on the poll, if there's enough interest then I'll document my current project as I work on it. Current project that I'm working on is a fairly simple Omegle (omegle.com) chat client. The tutorial would obviously demonstrate UI development, signals, slots, and networking using Qt, code in c++.
---
Qt4 is a widget based framework from nokia, mostly to do with GUI's but they have other APIs too for networking and stuff like that.
Here's a simple Hello World app:
main.cpp
include/MainWindow.h:
src/MainWindow.cpp:
---
Qt4 is a widget based framework from nokia, mostly to do with GUI's but they have other APIs too for networking and stuff like that.
Here's a simple Hello World app:
main.cpp
Code:
#include <QApplication>
#include "include/MainWindow.h"
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
MainWindow mainWin;
mainWin.show();
return app.exec();
}
Code:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
class MainWindow : public QMainWindow
{
public:
MainWindow();
protected:
void closeEvent(QCloseEvent *event);
private slots:
private:
QLabel *container;
};
#endif // MAINWINDOW_H
Code:
#include "../include/MainWindow.h"
MainWindow::MainWindow()
{
container = new QLabel(this);
container->setText("Hello World!");
setCentralWidget(container);
}
void MainWindow::closeEvent(QCloseEvent *event)
{
}