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. How do I know what -style arguments are recognised?

How do I know what -style arguments are recognised?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.2k 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.
  • T Offline
    T Offline
    toralf
    wrote on last edited by
    #1

    Hi,

    Qt application in general will allow you to specify the global GUI style by passing its name via "-style". This works rather well if you know what exactly the style name is, but what if you don't? I mean, say I want to check how the program looks with the built-in Gtk style, but can't quite remember its "official" name. (Is it just "Gtk"? Or perhaps "GTK"? Or "Gtk+" maybe?) How do I find out? Trial and error is of course an option, but this is made a lot harder by the fact that no error message is displayed if the given style does not actually exist; Qt will just silently ignore the parameter and go ahead with a default. And it can be hard to tell whether that's just what happended, or an alternative style was actually loaded...

    Does anyone know more about this?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cincirin
      wrote on last edited by
      #2

      QStyleFactory::keys() give you a string list with all possible values

      1 Reply Last reply
      0
      • T Offline
        T Offline
        toralf
        wrote on last edited by
        #3

        Ah, I didn't notice that when I looked through the docs. Thanks.

        It seems to me that there also ought to be some kind of tool or option to a tool that would call this routine and display the result, though. Do you know if something like that exist? It wouldn't be hard to write, obviously, but you'd think that someone had already done it.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cincirin
          wrote on last edited by
          #4

          I don't get about what tool (or option) are you referring :-)

          1 Reply Last reply
          0
          • T Offline
            T Offline
            toralf
            wrote on last edited by
            #5

            I'm referring to some way of printing the keys from the command line. I think it's strange if this isn't provided by some utility that's included with Qt, but maybe that's just me.

            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