Results 1 to 4 of 4

Thread: How to place QSlider inside and QPushButton above the widget area

  1. #1
    Join Date
    Oct 2010
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question How to place QSlider inside and QPushButton above the widget area

    Hello there,

    The default position of QSlider is to the right of the widget.
    I would like to
    • to place my slider inside the widget and
    • to make the groove transparent.
    Below given an example:



    The second question is pretty much the same. I would like to place QPushButton (and some other widgets like QLabel and QCheckBox) above the QTextEdit. Below is an example:


    How can I make it?
    I would really appreciate any help on those questions. Thanks in advance!
    Last edited by Cucumber; 6th December 2010 at 20:32.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to place QSlider inside and QPushButton above the widget area

    Why do you want to hide part of the text?

  3. #3
    Join Date
    Oct 2010
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to place QSlider inside and QPushButton above the widget area

    Quote Originally Posted by tbscope View Post
    Why do you want to hide part of the text?
    Just because of design.
    So, any clues? Thanks in advance.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to place QSlider inside and QPushButton above the widget area

    You can stack widgets by not using layouts and setting the right coordinates.
    You can make parts of the slider transparent by creating a custom style.

    You can also use a graphicsview as the parent widget and put all the child widgets in a scene. Then you can even do nice effects without a lot of effort. Or use QML directly.

    But, I would never use such a program. It's unbelievably annoying.

Similar Threads

  1. Replies: 10
    Last Post: 29th May 2010, 18:42
  2. How to get an area of the widget transparent...???
    By kapoorsudhish in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th March 2010, 04:20
  3. update(), aber not erase the the widget's area?
    By blm in forum Qt Programming
    Replies: 1
    Last Post: 26th September 2008, 15:26
  4. Replies: 5
    Last Post: 29th August 2007, 16:36
  5. QRubberBand painting in the scroll area widget
    By SkripT in forum Qt Programming
    Replies: 7
    Last Post: 17th January 2006, 16:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.