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. Please help me to understand style sheets
Qt 6.11 is out! See what's new in the release blog

Please help me to understand style sheets

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 568 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.
  • B Offline
    B Offline
    beetroot
    wrote on last edited by
    #1

    Hi
    In QDesigner I have a main form containing 1 widget.
    I am able to set the style sheet so that it has a border image -
    @
    border-image: url(:/TestStackedWidget/EMU Index Background.png);
    @
    This works and I get a border image displayed

    But I want this widget to be one of my custom widgets so I promote it via designer

    When the program is run the border image is not displayed and I do not understand why

    I have tried setting the style sheet programtically -
    @
    ui.page->setStyleSheet("{border-image: url(:/TestStackedWidget/Background.png)};");
    @
    or
    @
    ui.page->setStyleSheet("MyWidget#page {border-image: url(:/TestStackedWidget/Background.png)};");
    @
    but to no avail

    I would be grateful if someone could explain what is going on

    Thanks

    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