Results 1 to 7 of 7

Thread: QToolButton + style sheet problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QToolButton + style sheet problem

    Quote Originally Posted by John82 View Post
    I tried this. I wrote the above line in a .qss file and read it. But it didnt work, that is why I am am looking for a direct implementation.
    Did you mean by "direct implementation" setting the qss on the toolbutton? If so, that makes no difference and also there you have to respect the css syntax:
    Qt Code:
    1. tb->setStyleSheet ("::down-arrow {subcontrol-position: right center}");
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Aug 2015
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: QToolButton + style sheet problem

    Si necesitas estilizar y/o quieres controlar la flecha hacia abajo de los botones QToolButton de un QToolBar, es posible que tengas problemas cuando los creas a partir de QAction. La manera de acceder a ello es utilizando QToolButton::menu-arrow {...} o QToolButton::menu-button {...}

    Si tu tienes una barra de navegación la puedes nombrar barra->setObjectName("miBarra");
    Y puedes controlar su flecha abajo con #miBarra QToolButton::menu-arrow {...} o #miBarra QToolButton::menu-button {...}

Similar Threads

  1. qt 4 color palette / style sheet question
    By killerwookie99 in forum Qt Programming
    Replies: 1
    Last Post: 6th November 2008, 23:05
  2. [Qt 4.3.1]A problem with combobox style
    By Tamara in forum Qt Programming
    Replies: 3
    Last Post: 19th September 2007, 10:49
  3. QToolBox qss style sheet problem
    By eskil in forum Qt Programming
    Replies: 1
    Last Post: 17th August 2007, 17:45
  4. Qt 4.3 Style sheet, new features
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2007, 15:22
  5. Problem with qtoolbutton
    By moowy in forum Qt Programming
    Replies: 1
    Last Post: 22nd September 2006, 13:30

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.