Using Qt FLat style in normal c++ application



  • i want to use Flat style that is used in QML in the normal c++ application can i do that ? or it should be used only with QML application
    if i can use it what should i write ?
    is there is something like that

    #include "mainwindow.h"
    #include <QApplication>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        a.setStyle("Flat");
        MainWindow w;
        w.show();
    
        return a.exec();
    }
    

    or what should i do to use this style in normal c++ because it's very good style for android apps


  • Qt Champions 2016

    Hi
    If you mean the look newest QtCreator have , then as far as I know its not possible.
    Its not a Qt style but belongs to Creator and it has a file with colors and settings.

    "C:\Qt\Tools\QtCreator\share\qtcreator\themes\flat-light.creatortheme"
    [Colors]
    BackgroundColorAlternate=alternateBackground
    BackgroundColorDark=shadowBackground
    BackgroundColorHover=hoverBackground
    BackgroundColorNormal=normalBackground
    BackgroundColorDisabled=ff444444
    BackgroundColorSelected=selectedBackground
    xxx


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.