Just made a project, set to be console, and I added QWidget code, and removed all console code. Yet, why does console window show up? How annoying!!=.=
#include <QtGui>
#include <QWidget>
int main(int argv, char **args)
{
Window->setLayout(gridLayout);
Window->setFixedSize(500, 500);
Window->show();
return app.exec();
}
#include <QtGui>
#include <QWidget>
int main(int argv, char **args)
{
QApplication app(argv, args);
QWidget* Window;
QGridLayout *gridLayout = new QGridLayout();
Window->setLayout(gridLayout);
Window->setFixedSize(500, 500);
Window->show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
and
#-------------------------------------------------
#
# Project created by QtCreator 2012-06-07T12:02:13
#
#-------------------------------------------------
QT += core gui
TARGET = untitled1
TEMPLATE = app
SOURCES += main.cpp
#-------------------------------------------------
#
# Project created by QtCreator 2012-06-07T12:02:13
#
#-------------------------------------------------
QT += core gui
TARGET = untitled1
TEMPLATE = app
SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode
To be clear: I need a graphical window QT code that works with this (in one file)..
Bookmarks