Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using Qt FLat style in normal c++ application
Forum Updated to NodeBB v4.3 + New Features

Using Qt FLat style in normal c++ application

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 972 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AmrCoderA Offline
    AmrCoderA Offline
    AmrCoder
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved