Graphics View Flow Layout Example▲
The Graphics View Flow Layout example shows the use of a flow layout in a Graphics View widget.
This example uses a Graphics View to display the widget, which is a more customizable approach than displaying the flow layout in the application window (See https://).
Graphics View Flow Layout snippet:
#include "window.h"
#include <QApplication>
#include <QGraphicsView>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QGraphicsScene scene;
QGraphicsView *view = new QGraphicsView(&scene);
Window *w = new Window;
scene.addItem(w);
view->resize(400, 300);
view->show();
return app.exec();
}Flow Layout Example snippet:
#include <QApplication>
#include "window.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Window window;
window.show();
return app.exec();
}List of Files▲
Files:
List of Files▲
-
graphicsview/flowlayout/flowlayout.cpp
-
graphicsview/flowlayout/flowlayout.h
-
graphicsview/flowlayout/flowlayout.pro
-
graphicsview/flowlayout/main.cpp
-
graphicsview/flowlayout/window.cpp
-
graphicsview/flowlayout/window.h



