Qt noob needs help in making simple Qt application
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Qt noob needs help in making simple Qt application
I wish to write a small image resizing application (front-end to imageMagic's 'convert'), but I am total noob in Qt and linux dev tools. Not total noob though (senior Delphi and Adobe Flex/AS3 developer). I have basic knowledge of C++ and Python.
So I took Qt4 designer and designed my form, placed signals and slots, saved file, ... and that is about where my knowledge ends.
I tried to use KDevelop, but it is complex and create bunch of files, and I couldn't find where to import my UI or how to do it. Then i opened QDevelop which is simpler, could link my UI, but gave me bunch of errors as classnames was not the same as template. Tried to do something in it, but with no success.
So, my question is: is there anyone who can teach me how to make an application from an UI form? Since the application is fairly simple, I think it will not take too much time.
There are a lot of great books about using the Qt GUI toolkit. Coming on here asking for someone to do the work for you or tell you how to do everything, essentially, sounds like you have no initiative. Get one of the books... Also, Qt's own documentation is very helpful. There are many examples and tuturials you can work through.
I really do like this new qt-creator. It's fast, not some horrible Java thing like Eclipse and looks really nice.
Good luck and come back and ask if you want more help. I found this hideously complex when I first had a go and would never have made it without help from a friend. I don't think you have no initiative if you've got as far as you have.
Thank you all.
I was lost. Read few tutorials but they dont explain what I need.. just supposing that you know all the tools and "just do it'.
I will look into it. It is all confusing in the beginning.
@Guitarist88 And no, I didn't ask to be done instead of me (I hate that), just to give me guidelines to start. I have read bunch of tutorials and nowhere to find : "you made your UI, now start working with it by opening "THIS_TOOL and do THIS and THAT"
I'd like to keep some settings in text file.
For example if I have:
How do I read and write it easily? In Lazarus/Delphi, StringList has property "Values", so I can do like this:
MyStringList.values['SOURCE'] = whatever_to_Write
whatever_to_read = MyStringList.values['SOURCE'];
Hopefully that's easy enough to follow. Making the path to where I want the file first, then setting up the file name, then creating the file, opening it, writing this "stream" to it and finally closing the file.
Bear in mind this is Qt3, so it might be slightly different now. Checkout QTextStream in that link I posted above for more details on what it can do. It's very cool for opening files and quickly parsing them a line at a time. Although in some ways Qt is harder to get to grips with than Delphi at first, I think it's probably more powerful once you get into it.
This snippet from a program I wrote to look through dynamically create files when a USB device is plugged in might give you a bit more of an idea. :~)
if ((hpVariables[Offset].VarType=="enum") || (hpVariables[Offset].VarType=="bitmask"))
FileName = TypeDirectory + "/enum_val";
else if (hpVariables[Offset].VarType=="bitmask")
FileName = TypeDirectory + "/bit_val";
i = f2.open( IO_ReadOnly );
QTextStream OpenStream( &f2 );
hpVariables[Offset].ParamNames[j] = s;
hpVariables[Offset].ParamQuantity = j;