Hello I’m new to QT and C++, my primary language is JAVA (and I’m still a novice at that)
But I want to learn how to use QT and C++ combined and create some awesome GUI programs
I have a Bioinformatics program that reads a DNA sequence from a text file by imputing the file name then the DNA data appears
after the DNA data appears each individual character of the DNA sequence is converted into an RNA sequence.
what i want to happen is
A)the file name to be entered in the first text field
press a button
B)the DNA data appears in the second text field
press the second button
C) the RNA sequence appears in the third text field

I have the code written in C++ already i just want to learn how to implement it in a GUI program like QT

here’s my code
Please help!!
also are there any recommended tutorials out there to help achieve my goal?
and can I design stuff in Photoshop or illustrator and use it in QT?

#include<iostream>
#include<fstream>
#include<cstdlib>
#include <string>
using namespace std;
int input;
int main()
{


char filename[50];
ifstream seq;
cin.getline(filename, 50);
seq.open(filename);

if(!seq.is_open()){
exit(EXIT_FAILURE);
}

char DNA[50];
char RNA[50];
seq>>DNA;

cout<< DNA <<" "<<endl;

int len=0;
for(int i=0; i<=sizeof(DNA); i++){

if (DNA[i] == 'A')
{cout<<"U";
RNA[i]='U';
len++;
}
if (DNA[i] == 'G')
{cout<<"C";
RNA[i]='C';
len++;
}
if (DNA[i] == 'C')
{cout<<"G";
RNA[i]='G';
len++;
}

if (DNA[i] == 'T')
{cout<<"A";
RNA[i]='A';
len++;
}
}
cout<<endl;
for(int i=0; i<len; i++){
cout<<RNA[i];
}
cout<<endl<<sizeof(DNA)<<endl;
cout<<len<<endl;
fstream file;
file.open("RNA_DNASeq.txt",ios::out);
file<<DNA<<endl<<RNA<<endl;
file.close();

system("PAUSE");
return 0;
}

There are some excellent Qt tutorials out on the web. Fire up your Google search tool and find them...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.