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 to use CreateFont API function in Qt5
QtWS25 Last Chance

How to use CreateFont API function in Qt5

Scheduled Pinned Locked Moved Unsolved General and Desktop
createfont apiwinapi
19 Posts 3 Posters 6.2k 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 21 May 2016, 22:08 last edited by
    #10

    @kshegunov Not a typo ;) See here

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    K 1 Reply Last reply 21 May 2016, 22:19
    0
    • S SGaist
      21 May 2016, 22:08

      @kshegunov Not a typo ;) See here

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 21 May 2016, 22:19 last edited by
      #11

      @SGaist said:

      It would rather be LIBS += -LGdi32.

      I know, I know. Still looks like you typed -L instead of -l ;)

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 21 May 2016, 22:21 last edited by
        #12

        Haaaaaaa that typo ! Good catch ! Then indeed, there was ! :)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        U 1 Reply Last reply 22 May 2016, 10:28
        0
        • K kshegunov
          21 May 2016, 19:57

          @Uncle-Kris
          LIBS += -L"H:\Windows Kits\8.1\Lib\winv6.3\um\x86/gdi32"\

          This is incomplete. The backslash at the end means it continues on to the next line. Also, when giving paths, use the forward slash instead of the a backwards. It is recognized on windows and you'll work around a ton of problems with escaping in the long run.

          There is no info on compiler dependency. Just folder full of libraries. How I can check?

          It should be noted somewhere on the MS's site, however I have no windows on hand to check. What compiler are you using currently? The 8.1 SDK should work with MSVC 2012/2013 if I recall correctly.

          U Offline
          U Offline
          Uncle Kris
          wrote on 22 May 2016, 10:23 last edited by
          #13

          @kshegunov There was a next line. I have removed it for test time. Also changes to shash/backslash do not make any difference for now. Linker is not happy.

          1 Reply Last reply
          0
          • S SGaist
            21 May 2016, 22:21

            Haaaaaaa that typo ! Good catch ! Then indeed, there was ! :)

            U Offline
            U Offline
            Uncle Kris
            wrote on 22 May 2016, 10:28 last edited by
            #14

            @SGaist What typo? Can you be more specific, please? Compiler has no problem with that line. And it used to work in another IDE.

            Also: "It would rather be LIBS += -LGdi32." No. Without full path there is a message that file is not found. -L and -l makes no difference so far.

            K 1 Reply Last reply 22 May 2016, 11:16
            0
            • U Uncle Kris
              22 May 2016, 10:28

              @SGaist What typo? Can you be more specific, please? Compiler has no problem with that line. And it used to work in another IDE.

              Also: "It would rather be LIBS += -LGdi32." No. Without full path there is a message that file is not found. -L and -l makes no difference so far.

              K Offline
              K Offline
              kshegunov
              Moderators
              wrote on 22 May 2016, 11:16 last edited by
              #15

              @Uncle-Kris
              A library is passed to qmake (respectively make) with the following syntax:

              LIBS += -L/path/to/library -llibraryname
              

              The typo was that @SGaist used the switch for library path -L to specify the library name. It should've been -lgdi32. So in your case it'd look something like this:

              LIBS += -L"H:/Windows Kits/8.1/Lib/winv6.3/um/x86" -lgdi32
              

              Read and abide by the Qt Code of Conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 22 May 2016, 15:12 last edited by
                #16

                Yes the typo was the L vs l but still the library name is Gdi32

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                K 1 Reply Last reply 22 May 2016, 17:20
                0
                • S SGaist
                  22 May 2016, 15:12

                  Yes the typo was the L vs l but still the library name is Gdi32

                  K Offline
                  K Offline
                  kshegunov
                  Moderators
                  wrote on 22 May 2016, 17:20 last edited by
                  #17

                  @SGaist said:

                  but still the library name is Gdi32

                  The windows linker isn't case sensitive. :)

                  Read and abide by the Qt Code of Conduct

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 22 May 2016, 20:42 last edited by
                    #18

                    @kshegunov said:

                    @SGaist said:

                    but still the library name is Gdi32

                    The windows linker isn't case sensitive. :)

                    Indeed, but I wouldn't be surprised if that changed at some point :D

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    K 1 Reply Last reply 22 May 2016, 20:48
                    0
                    • S SGaist
                      22 May 2016, 20:42

                      @kshegunov said:

                      @SGaist said:

                      but still the library name is Gdi32

                      The windows linker isn't case sensitive. :)

                      Indeed, but I wouldn't be surprised if that changed at some point :D

                      K Offline
                      K Offline
                      kshegunov
                      Moderators
                      wrote on 22 May 2016, 20:48 last edited by kshegunov
                      #19

                      @SGaist said:

                      Indeed, but I wouldn't be surprised if that changed at some point :D

                      Perhaps, perhaps. Although, judging from the time it took MS to introduce the x64 compiler, if it were to change, it'd take decades. And since it hasn't changed for over 30 years, I really doubt that it ever will. :D

                      Read and abide by the Qt Code of Conduct

                      1 Reply Last reply
                      0

                      19/19

                      22 May 2016, 20:48

                      • Login

                      • Login or register to search.
                      19 out of 19
                      • First post
                        19/19
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved