×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Problems developing in Qt Creator

  • Posts: 554
  • Thank you received: 138
I'm trying to sort out the polar align code for the Ekos Align module so I thought i'd write a separate application as a test harness and once the code is working it can be transferred to ekos.

But I've got stuck. I've set up a UI with a button that does the polar align computations. There doesn't seem to be any obvious way in the Qt Creator development system to get a click on a button to activate a function.

This is easy in Visual Studio. I double click on the button in the UI designer and I'm taken straight to the OnButton_Click() function where I can implement what I need to do.

I can't find anything similar in Qt and this seems a bit surprising when they say that buttons are one of the most widely used way to control an application, but seem to do nothing to help people use it.

I realise that what I'm thinking of as events and event handlers are slots and signals - or is is signals and slots? But I can't see any obvious way to implement what I need. Looking at what I can find on the web it seems so obvious that there's no need to explain.

I'd like to do this in C++ but at present it seems that the most productive way would be to develop and test in C# using Windows and then port the result to C++ once I've got this going. It feels like the most productive way, but not much of an endorsement for the Linux C++ wprld. Have I missed something?

I should point out that I would like to use Linux/C++/Qt, but I seem to be defeated at every turn. This is the last of many things. I wasted much of last week trying to get GoogleTest working with KStars and even though it had already been implemented it still took three or four days to get it going. After that a day or so and I had some useful code implemented and tested. But spending 2/3rd of my time fighting the system doesn't feel good. I may be retired but it's not what I want to spend my time doing. I don't like feeling unproductive.

Sorry for the rant but this is a real problem I'm having. Is having a development system in Linux that's easy and intuitve to use too much to ask?

Chris
3 years 11 months ago #54197

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
Hi Chris,

I'm sure you've taken the words right out of many mouths in your last paragraph(s). This isn't the first code set to be difficult to work with, and it won't be the last. There's precious little help via documentation or examples for folks to leverage. It definitely should be easier than this. This is why I posted this request recently:
www.indilib.org/forum/general/6955-zoom-...v-process.html#53594
As it is, you've really got to want to go an extra 10 miles to get over the learning hump, because it's going to be a rough start for sure. I hope you make it (as I hope for myself). No help (I know) on the specific issue of Qt Creator buttons, but no need to feel sorry for expressing a minor complaint. Cheers, Doug
Last edit: 3 years 11 months ago by Doug S.
3 years 11 months ago #54214

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Thanks for the reply Doug, at least I hadn't missed some simple way to get the click event hooked to code. This really is as difficult and obscure as it appears.

I 'solved' my problem by doing the development and testing in a WinForms application using Visual Studio. That gave me a developent environment that helped rather than hindered me. I've found a solution that's a lot cleaner than what's currently in Ekos. All it needs is porting to C++ and adding a test harness.
3 years 11 months ago #54275

Please Log in or Create an account to join the conversation.

Time to create page: 0.519 seconds