Giter VIP home page Giter VIP logo

dmsnavigation's Introduction

DMS Navigation

The DMS Navigation widget implements a beautiful tab widget alternative for Qt. The widget is implemented as Qt Widget and not QML.

I use this widget in a private project and decided to publish it beacuase it looks beautiful.

center

API

The API implements a set of methods you know from QTabWidget.

int addTab(QWidget* widget, const QString& text);
int addTab(QWidget* widget, const QIcon& icon, const QString& text);

int insertTab(int index, QWidget* widget, const QString& text);
int insertTab(int index, QWidget* widget, const QIcon& icon, const QString& text);

void removeTab(int index);

QString tabText(int index) const;
void setTabText(int index, const QString& text);

QIcon tabIcon(int index) const;
void setTabIcon(int index, const QIcon& icon);

enum HorizontalAlignment { AlignLeft, AlignCenter, AlignRight };

HorizontalAlignment horizontalAlignment() const;
void setHorizontalAlignment(HorizontalAlignment alignment);

int count() const;
int currentIndex() const;

public slots:
void setCurrentIndex(int index);

Usage

Using the widget is pretty simple. This is the example of the GIF you see above.

int main(int argc, char** argv)
{
   QApplication app(argc, argv);

   DMSNavigation navi;
   navi.resize(600, 50);
   navi.show();

   navi.addTab(new QTextEdit("The first."), "Text 1");
   navi.addTab(new QTextEdit("The second."), "Text 2");
   navi.addTab(new QTextEdit("The third."), "Text 3");

   return app.exec();
}

Version

1.0

Initial realease.

Thank you thibaut.

A special thank goes to thibaut who designed and inspired me. The widget was implemented as HTML and CSS control and I found it on the following site: http://ui-cloud.com/dark-navigation/.

License

MIT

Free Software, Hell Yeah!

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.