Link: @CplusplusQt Embedded: @EMBCpp • Allowed Topics: C++ and everything related to Qt • Use only English • No Private Message without asking user's permission • No NSFW • No Spam • No unauthorized Bots • No Offtopic • No Self Promotions
The point/rule is that auto
can't deduce top-level const
. i
has a top-level const
while none of s
and pd
has that.
Try not to use Canvas in QML if you care about your application's performance.
https://doc.qt.io/qt-6/qml-qtquick-shapes-conicalgradient.html
Here is a html canvas version:
https://stackoverflow.com/questions/14193956/draw-arc-with-linear-gradient-in-html5-canvas
I tried adding a gradient so that when the progress is at 0 it's black and when it reaches 100 its in cyan, I used linear gradient and it's not working as I intended it to
Читать полностью…a
is S<const int>
but not const S<const int>
. It doesn't deduce anything there. The template was instantiated with const int
, so it's const int
.q
is const double *
but not const double * const
. It's a pointer to a constant object, but not a constant pointer.
auto
in a
can deduce that the type is S<const int>
not S<int>
, likewise in q
, it can deduce the type is const double*
and not double*
auto
has been used for a
and q
with const
deduced correctly without need to use const auto
.
I guess what Sébastien means is that you aren't wondering why
int i = 42;
i
with a constant expression 42
. So, with auto
it's kinda the same.
Читать полностью…
int j = 42; // 42 is const (event constexpr) but j is not const
Читать полностью…template <typename T>
S
struct S {};
int main() {
S<const int> s;
s = <const int>{}; // OK
a
auto a = s;// type of is S<const int>
j
const int i{};
auto j = i; // type of is
intconst double *pd {new double(3.4)};
type of
auto q = pd; // q
is const double*
…
//
}
You can use a combination of MultiEffect
's opacity mask and ConicalGradient
.
https://doc.qt.io/qt-6/qml-qtquick-shapes-conicalgradient.html
Hi am new to qt i have some doubt how to use qface framework and how to create publisher / subscriber model is it really required IVI?
Читать полностью…Qt Graphical Effects is deprecated in Qt6 and available as part of QtCompat module. Alrenatives are Qt MultiEffects and Shapes.
Читать полностью…It's hard to explain but I'm just trying to mirror but the source is in a different window...actually different screen 😅
Читать полностью…Any chance there's a workaround for this error?ShaderEffectSource: sourceItem and ShaderEffectSource must both be children of the same window
I already have a good plan and my code makes sense but this is a deal breaker and bug report said they won't fix it 😭
Hey I was trying to implement a circular progress bar and tried something but it's not working as intended
Читать полностью…What you’ve mentioned are correct but yet there’s a little and subtle point remaining.
Читать полностью…a is not const and q neither. q can point to another double.
Читать полностью…If you need the same type on the left, use const auto
explicitly or maybe decltype
Kind of a challenge.
Why does auto
behave differently in deducing const
for j?
Hi, I need someone who can make a Tetris application in Qt
Читать полностью…