Convert small PyQt script to Qt C++
-
@JonB aaand i gave up :/ i bet there is a ton of errors but...
Header -> https://pastebin.com/UdDHhpBZ
CPP -> https://pastebin.com/Eezyiqcg@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 😜 -
@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 😜wrote on 8 Dec 2020, 16:01 last edited by@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-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'
@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.
21/23