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. QApplication::setStyle
Qt 6.11 is out! See what's new in the release blog

QApplication::setStyle

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

    hi every body .
    @
    QApplication::setStyle( "macintosh" );
    @

    why this code doesnt work ?!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexisdm
      wrote on last edited by
      #2

      You should define "doesn't work" more precisely.

      But if you are not on a mac, that style isn't available.
      And if you call that function after the widgets have already been created, it doesn't have any effect (I think you would have to call setStyle recursively on every widget and their children).

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dbzhang800
        wrote on last edited by
        #3

        I don't know why you want to manually set style to "macintosh", which is the default style of MAC already.

        And if you OS is not MAC, "macintosh" will not exist. Read the manual please.

        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