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. Imbedding a bitmap for styles using , static const char * arrays
QtWS25 Last Chance

Imbedding a bitmap for styles using , static const char * arrays

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 292 Views
  • 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.
  • TrilecT Offline
    TrilecT Offline
    Trilec
    wrote on last edited by Trilec
    #1

    Hi All,
    Are there any tools or websites that can convert simple bitmaps to Qt friendly "static const char * const"
    Im creating my own style class and would like to in-code some of them.
    Im assuming the format is XPM?
    Also can other formats be imbeded (i would like to get alpha)

    static char* <variable_name>[] = {
    <Values>
    <Colors>
    <Pixels>
    <Extensions>
    };
    
    static const char * const qt_scrollbar_button_arrow_right[] = {
        "4 7 2 1",
        "   c None",
        "*  c #BFBFBF",
        "*   ",
        "**  ",
        "*** ",
        "****",
        "*** ",
        "**  ",
        "*   "};
    

    If ts not in the computer it doesn't exist!...

    1 Reply Last reply
    0
    • TrilecT Offline
      TrilecT Offline
      Trilec
      wrote on last edited by
      #2

      Seem to have found one
      https://convertio.co/download/b53877295ae47929de85da0ee41c24df713200/

      If ts not in the computer it doesn't exist!...

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #3

        Hi
        You can use a more modern way and use a QRessource file ?
        https://doc.qt.io/qt-5/resources.html

        PNGs are great for alpha.
        (can be imbedded too )

        Qt does not use XPM for style sheets or icons.

        1 Reply Last reply
        0
        • TrilecT Offline
          TrilecT Offline
          Trilec
          wrote on last edited by
          #4

          @mrjj said in Imbedding a bitmap for styles using , static const char * arrays:

          Hi
          You can use a more modern way and use a QRessource file ?
          https://doc.qt.io/qt-5/resources.html

          Qt does not use XPM for style sheets or icons.

          Thanks Mrjj, will check it out,
          I'm referring to subclassing QProxyStyle etc. refer to qplastiquestyle.cpp, qfusionstyle,cpp
          XMP are imbedded in this and other styles.

          If ts not in the computer it doesn't exist!...

          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