Sending struct to QDialog
-
@RainyDays said in Sending struct to QDialog:
but it complains when i want to point the data towards the dialog?
What does this mean?
@Christian-Ehrlicher said in Sending struct to QDialog:
@RainyDays said in Sending struct to QDialog:
but it complains when i want to point the data towards the dialog?
What does this mean?
"No viable conversion from Mainstruct to Dialogstruct"
Where Mainstruct is a struct in the MainWindow and Dialogstruct is a struct in the DialogWindow.
Both are set up like this
typedef struct { bool Condition1; bool Condition2; bool Condition3; QString String1; QString String2; QString String3; } -
@Christian-Ehrlicher said in Sending struct to QDialog:
@RainyDays said in Sending struct to QDialog:
but it complains when i want to point the data towards the dialog?
What does this mean?
"No viable conversion from Mainstruct to Dialogstruct"
Where Mainstruct is a struct in the MainWindow and Dialogstruct is a struct in the DialogWindow.
Both are set up like this
typedef struct { bool Condition1; bool Condition2; bool Condition3; QString String1; QString String2; QString String3; }@RainyDays said in Sending struct to QDialog:
Both are set up like this
Which is wrong - you need one struct definition.
You really should start with the basics of c(++) before fiddling around with Qt.
-
@RainyDays said in Sending struct to QDialog:
Both are set up like this
Which is wrong - you need one struct definition.
You really should start with the basics of c(++) before fiddling around with Qt.
Informative, well chosen.
I hear QT is a mysterious device that could be dangerous for those who have not chosen the right path from the beginning.
Thanks for the warning :) -
Informative, well chosen.
I hear QT is a mysterious device that could be dangerous for those who have not chosen the right path from the beginning.
Thanks for the warning :)@RainyDays said in Sending struct to QDialog:
I hear QT is a mysterious device that could be dangerous for those who have not chosen the right path from the beginning.
If you think... but i only said that at least basic c++ knowledge is needed since Qt is a c++ library.
-
@RainyDays said in Sending struct to QDialog:
I hear QT is a mysterious device that could be dangerous for those who have not chosen the right path from the beginning.
If you think... but i only said that at least basic c++ knowledge is needed since Qt is a c++ library.
@Christian-Ehrlicher
The first time is always the hardest time and for me this was too many years ago :)
Takes a while to get the engine running again!
But why stop when you reach an obstacle? Just ask for a friendly helping hand?I´m really sure though i need to define the structs in each of the header files.
Otherwise the dialog does not know what it´s struct is...right? -
One single definition.
Put that in a different header that both can include.
-
That's the goal: one single source of truth.