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. Set tiled wallpaper of Desktop

Set tiled wallpaper of Desktop

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.6k 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.
  • S Offline
    S Offline
    samdol
    wrote on last edited by
    #1

    What is the good way to set tiled wallpaper of desktop using jpg file? Do I have to change it to other format? I couldn't find on Qt document. Does Qt itself support this?

    1 Reply Last reply
    0
    • Ni.SumiN Offline
      Ni.SumiN Offline
      Ni.Sumi
      wrote on last edited by
      #2

      Hi @samdol ,

      You can use jpeg format for setting it as Desktop Wallpaper. Please see this link , sample code from Mr. @mrjj .

      S 1 Reply Last reply
      1
      • Ni.SumiN Ni.Sumi

        Hi @samdol ,

        You can use jpeg format for setting it as Desktop Wallpaper. Please see this link , sample code from Mr. @mrjj .

        S Offline
        S Offline
        samdol
        wrote on last edited by
        #3

        @Ni.Sumi
        Thank you for the link. This seems set a stretched picture as wallpaper. Is there a way to set a tiled pictures as a wallpaper?

        mrjjM 1 Reply Last reply
        0
        • S samdol

          @Ni.Sumi
          Thank you for the link. This seems set a stretched picture as wallpaper. Is there a way to set a tiled pictures as a wallpaper?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @samdol
          Hi, I think you need to set that as registry

          // set reg
          HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper to 1
          You can use
          http://doc.qt.io/qt-5/qsettings.html
          for that as far as i know. (never tried it)
          Something like:

          QSettings settings("HKEY_CURRENT_USER\\Control Panel\\Desktop", Setting::NativeFormat);
          settings.setValue("TileWallpaper ", "1");
          
           // Refresh the background
          SystemParametersInfo(SPI_SETDESKWALLPAPER, 0,  NULL, SPIF_UPDATEINIFILE);
          
          S 1 Reply Last reply
          2
          • mrjjM mrjj

            @samdol
            Hi, I think you need to set that as registry

            // set reg
            HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper to 1
            You can use
            http://doc.qt.io/qt-5/qsettings.html
            for that as far as i know. (never tried it)
            Something like:

            QSettings settings("HKEY_CURRENT_USER\\Control Panel\\Desktop", Setting::NativeFormat);
            settings.setValue("TileWallpaper ", "1");
            
             // Refresh the background
            SystemParametersInfo(SPI_SETDESKWALLPAPER, 0,  NULL, SPIF_UPDATEINIFILE);
            
            S Offline
            S Offline
            samdol
            wrote on last edited by samdol
            #5

            @mrjj
            Thank you mrjj.
            Just for minor correction.
            settings.setValue("TileWallpaper ", "1");
            Then it works.

            mrjjM 1 Reply Last reply
            1
            • S samdol

              @mrjj
              Thank you mrjj.
              Just for minor correction.
              settings.setValue("TileWallpaper ", "1");
              Then it works.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @samdol
              Thank you. Changed.

              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