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. design problem
Forum Updated to NodeBB v4.3 + New Features

design problem

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 223 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.
  • A Offline
    A Offline
    alexbox
    wrote on last edited by alexbox
    #1

    Hello
    i had a weird problem in the style when i use this

            QFile styleFile( ":/style/style/style.qss" );
            styleFile.open( QFile::ReadOnly );
            QString style(styleFile.readAll());
            qApp->setStyleSheet(style); // Apply the loaded stylesheet
    

    it applies the style on :/style/style/style.qss
    but when i use a custom style for a form it forces the software to use style.qss instead of the custom style in this form

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

      Hi and welcome to the forums
      Tried fast with
      QApplication a(argc, argv);
      a.setStyleSheet("background-color: rgb(0, 255, 127);");

      and in MainWindow constructor
      setStyleSheet("background-color: rgb(0, 0, 0);");

      and that works as expected.

      This is on win 10, Qt 5.12

      I think we need more info to help you :)

      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