dear freind
i have tried your suggestion.
I will give some more details of the program which I have.
I have made a GUI in QT 3.3.4 ( on Suse10) . I have utilized the Main Dialog.
All the objects are created from FORM class (which iself is derived from QMainWindow as class Form : public QMainWindow)
Now my requirement is to be able to show an image / any ( not only text) file when i click on a button in this form or when a image /text file is selected from a file menu and copied to a textedit widget.
I have tried using system commands like system ( " gedit filename " or " "image veiwer filename")
but this blocks the application and one has to close the gedit window to do anything on the form.
Moreover the filename is static in this scenario. So i tried script file by inputing the name of the file and running the script( which also had the system command giving the same problem)
hence i have to use some class to show these files.
how to go about it.
i have tried one similar FAQ as
-------------------------------------------------------------------------
Assuming you have two form classes: Form1 and Form2 and that Form1 has a pushbutton "button" child and Form2 is derived from QDialog.
Add a custom slot to Form1 and fill it with:
void Form1::openForm2(){
static Form2 *form2 = new Form2(this);
form2->show();
form2->activateWindow(); // or form2->setActiveWindow() in Qt3
form2->raise();
}
void Form1::openForm2(){
static Form2 *form2 = new Form2(this);
form2->show();
form2->activateWindow(); // or form2->setActiveWindow() in Qt3
form2->raise();
}
To copy to clipboard, switch view to plain text mode
If you want Form2 to be modal change it to:
void Form1::openForm2(){
Form2 form(this);
form2.exec();
}
void Form1::openForm2(){
Form2 form(this);
form2.exec();
}
To copy to clipboard, switch view to plain text mode
Then you have to connect a proper signal to this slot. In the constructor of Form1 add:
connect(button, SIGNAL(clicked()), this, SLOT(openForm2()));
---------------------------------------------------------------------------------
but it didnot work out.
i looked for the "kdeui" lib and found
kdeui.so size : 63864 bytes
kdeui.tag size : 1,086,440 bytes
kdeuimod.sip size : 3912 bytes
which one do i include and how
please guide me.
Bookmarks