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

Syntax Question

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.1k 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.
  • K Offline
    K Offline
    kyanos
    wrote on last edited by
    #1

    ok im back again o.o this time its syntax...

    i have what i think is the precise class tree entry for something, but im not sure how to designate that i want to change that EXACT thing... im working with a QSS stylesheet in notepad, example bit from it is

    @
    Qwidget
    {
    margin-top: 23px;
    }
    @
    the object im trying to change is i think

    Superclass: QAbstractSlider
    Parentclass: QSlider
    Classname: OptionsDialog
    objectname: opacitySlider

    EDIT: please use @-tags for code highlighting, Gerolf

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mazur
      wrote on last edited by
      #2

      Use function setObjectName() on your object called opacitySlider, for example

      @
      setObjectName("opacitySlider");
      @
      and then in QSS file just put

      @
      QSlider#opacitySlider { } ..
      @

      EDIT: please use @-tags for code highlighting, Gerolf

      delete this->signature;

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kyanos
        wrote on last edited by
        #3

        i dont have access to the actual code file

        sweet, the latter part worked :O thanks! just got to try it out, was out driving and had access to the comp for only short periods xD

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          Hi kyanos,

          if you go through the "docs":http://doc.qt.nokia.com/4.7/stylesheet.html you can find all the possible "selectors and selector types":http://doc.qt.nokia.com/4.7/stylesheet-syntax.html#selector-types .
          Hope those links help for the next time :-)

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0

          • Login

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