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. Convert small PyQt script to Qt C++
Forum Updated to NodeBB v4.3 + New Features

Convert small PyQt script to Qt C++

Scheduled Pinned Locked Moved Unsolved General and Desktop
23 Posts 5 Posters 5.5k 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.
  • K Kris Revi
    8 Dec 2020, 10:34

    @JonB aaand i gave up :/ i bet there is a ton of errors but...

    Header -> https://pastebin.com/UdDHhpBZ
    CPP -> https://pastebin.com/Eezyiqcg

    J Offline
    J Offline
    J.Hilk
    Moderators
    wrote on 8 Dec 2020, 12:27 last edited by J.Hilk 12 Aug 2020, 13:17
    #21

    @Kris-Revi
    Merry Christmas!

    https://github.com/DeiVadder/QWidgetGradient.git


    After some testing, the functionality is kind of strange, not sure if thats intended behavior, or if I made a bug 🤔
    For you to find out I guess 😜


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    K 1 Reply Last reply 8 Dec 2020, 16:01
    2
    • J J.Hilk
      8 Dec 2020, 12:27

      @Kris-Revi
      Merry Christmas!

      https://github.com/DeiVadder/QWidgetGradient.git


      After some testing, the functionality is kind of strange, not sure if thats intended behavior, or if I made a bug 🤔
      For you to find out I guess 😜

      K Offline
      K Offline
      Kris Revi
      wrote on 8 Dec 2020, 16:01 last edited by
      #22

      @J-Hilk wow, thank you sooo much! christmas came early!! <3

      i get these errors in the Header file alone

      G:\QT GUI\TesterGradient\gradient.h:31: error: C2429: attribute 'nodiscard' requires compiler flag '/std:c++17'
      G:\QT GUI\TesterGradient\gradient.cpp:3: error: C2653: 'gradient': is not a class or namespace name
      G:\QT GUI\TesterGradient\gradient.cpp:4: error: C4430: missing type specifier - int assumed. Note: C++ does not support default-int
      G:\QT GUI\TesterGradient\gradient.cpp:6: warning: C4508: 'gradient': function should return a value; 'void' return type assumed
      g:\qt gui\build-testergradient-desktop_qt_5_15_1_msvc2019_32bit-debug\debug\..\..\TesterGradient\gradient.h:31: error: C2429: attribute 'nodiscard' requires compiler flag '/std:c++17'
      
      J 1 Reply Last reply 8 Dec 2020, 16:14
      0
      • K Kris Revi
        8 Dec 2020, 16:01

        @J-Hilk wow, thank you sooo much! christmas came early!! <3

        i get these errors in the Header file alone

        G:\QT GUI\TesterGradient\gradient.h:31: error: C2429: attribute 'nodiscard' requires compiler flag '/std:c++17'
        G:\QT GUI\TesterGradient\gradient.cpp:3: error: C2653: 'gradient': is not a class or namespace name
        G:\QT GUI\TesterGradient\gradient.cpp:4: error: C4430: missing type specifier - int assumed. Note: C++ does not support default-int
        G:\QT GUI\TesterGradient\gradient.cpp:6: warning: C4508: 'gradient': function should return a value; 'void' return type assumed
        g:\qt gui\build-testergradient-desktop_qt_5_15_1_msvc2019_32bit-debug\debug\..\..\TesterGradient\gradient.h:31: error: C2429: attribute 'nodiscard' requires compiler flag '/std:c++17'
        
        J Offline
        J Offline
        J.Hilk
        Moderators
        wrote on 8 Dec 2020, 16:14 last edited by J.Hilk 12 Aug 2020, 16:19
        #23

        @Kris-Revi well, it compiles for me :P

        remove the [[nodiscard]] attribute, its not needed, and if your compiler is not c++17 capable, no need to have it there


        Edit: check the repo, I updated it, inclusive a bugfix I found.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        1

        21/23

        8 Dec 2020, 12:27

        • Login

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