Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Strange slider behavior
Forum Updated to NodeBB v4.3 + New Features

Strange slider behavior

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 543 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.
  • Flaming MoeF Offline
    Flaming MoeF Offline
    Flaming Moe
    wrote on last edited by
    #1

    Hey ho Giggity,

    i´m stumbling in my way on Qt on an Android driven XPeria.
    Basicly i´m making up a very simple Apple to get a feeling for different kind of things.
    https://www.dropbox.com/s/bqnir2gg8sz9ehk/Screenshot_2015-03-12-21-23-46.jpg?dl=0
    One of them is to give a slider a custom appearance by applying stylesheets
    S1->setStyleSheet("QSlider::groove:horizontal{border: 40px solid #800040; height: 10px; background: red; margin: 20px 0} QSlider::handle:horizontal{background: blue; margin: 70px; border 20px solid black; width: 70px; height: 70px}");

    What makes me wondering is that i can´t scroll the slider. It only moves, if i "double-klick" with my finger somewhere on the groove. Then the handle come over. But i can´t press the handle directly and move it.

    Does someone have a suggestion?

    A lovely day for a ̶g̶̶u̶̶i̶̶n̶̶n̶̶e̶̶s̶ DUFF^^

    1 Reply Last reply
    0
    • Flaming MoeF Offline
      Flaming MoeF Offline
      Flaming Moe
      wrote on last edited by
      #2

      Ok, solved it my self.
      The stylesheet syntax was wrong. Actually i have little problems to figure out the mechanisms.

      This works:

      slider1->setGeometry(50, 370, 900, 140);

      slider1->setStyleSheet("QSlider::groove:horizontal{border: 20px solid #800040; height: 10px; background: red; margin: 90px 0} QSlider::handle:horizontal{background-color: green; border: 3px solid blue; width: 140px; border-radius: 3px; margin: -65px}");

      A lovely day for a ̶g̶̶u̶̶i̶̶n̶̶n̶̶e̶̶s̶ DUFF^^

      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