Giter Site home page Giter Site logo

vampirely / longscroll-qt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from triplewhy/longscroll-qt

0.0 0.0 0.0 1.21 MB

Library to create really long scrollable widgets in Qt. Tested with millions of images.

License: GNU Affero General Public License v3.0

C++ 94.43% C 1.74% CSS 0.07% QMake 3.76%

longscroll-qt's Introduction

longscroll-qt

Build Status Build status

icon

longscroll-qt is a C++ library to create very long, fast and responsive scrollable widgets in Qt.

The longscroll widget can visualize a large list of items, similar to a QAbstractItemView. The main differences are that longscroll-qt is responsive, has much more flexible layout options and uses real widgets to display items. This allows easy user interaction and simple customization as you can for example use the Qt designer to create an item widget. longscroll-qt also offers a fully customizable navigator widget wich is shown between two rows, creating a complete google-images-like view.

The library was tested and works with millions of image items.

API Docs

Online documentation for the current release can be found at https://triplewhy.gitlab.io/longscroll-qt/doc/.

You can also download a html or qhp version to integrate into Qt Assistant and Qt Creator.

Examples

The library comes with two examples. To understand the behavior best, keep resizing the window.

  • examples/simple sets up a simple program using only a few lines of code to get you up running fast.
  • examples/demo deomstrates the power of longscroll-qt by providing a gui that lets you dynamically change nearly every setting to see what it does.

The documentation of longscroll::ContentWidget can give a good overview of what longscroll-qt can do, as most of its functionality is provided by that class.

Stylesheets

longscroll-qt widgets can be styled like any other widget. Since longscroll-qt uses a namespace, longscroll by default, stylesheets have to specify it too. For example:

longscroll--ContentWidget {
	background: blue;
}
longscroll--ImageWidget {
	background: yellow;
}

Requirements

longscroll-qt needs Qt 5 and a C++11 compatible compiler. It can run on all systems that have Qt, including Linux, Windows and Mac OS X. Building the documentation additionally requires doxygen and graphviz.

On Ubuntu all requirements (including docs) can be installed with the following packages:

# apt-get install build-essential clang qtbase5-dev qtbase5-doc-html qttools5-dev-tools doxygen graphviz libqt5sql5-sqlite

Compiling

Compiling is as easy as with any other Qt program. You can either open src/longscroll-qt.pro in your favorite IDE or use qmake directly. In both cases you shold additionally build the install target. The examples are examples/simple/simple.pro and examples/demo/demo.pro.

Compiling from the command line could be for example like this:

cd src
qmake
make
make install

# Build and run examples:

cd ..
cd examples/simple/
qmake
make
make install
LD_LIBRARY_PATH=<longscroll-qt lib dir> ./simple <some dir>
# for example:
LD_LIBRARY_PATH=../../dist/linux-g++-64/lib ./simple ~/Pictures/

cd ..
cd demo/
qmake
make
make install
LD_LIBRARY_PATH=<longscroll-qt lib dir> ./demo [some dir [demo number]]
# for example:
LD_LIBRARY_PATH=../../dist/linux-g++-64/lib ./demo

Notes:

  • You might have to use qmake -qt=5 on ubuntu.
  • Replace make by nmake or jom when building a msvc version.

Additional Make Targets

make install
make docHtml
make docQhp
make docs
  • install Installs the library into the dist directory.
  • docHtml Creates html documentation inside the dist directory.
  • docQhp Creates qhp documentation inside the dist directory. This can be loaded in Qt Assistant and Qt Creator.
  • docs Creates html and qhp documentation.

Screenshots

This library can best be experienced by running and resizing the demo program. The following are some layout possibilities from the documentation (they are actual screen shots):

layout 1 layout 2 layout 3 layout 4 layout 5 layout 6

Alright here are some real screenshots anyway:

screenshot 1

screenshot 2

screenshot 3

screenshot 4

screenshot 5

License

longscroll-qt is licensed under AGPL v3. (Contact me if you need a commercial license.)

longscroll-qt's People

Contributors

triplewhy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.