| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 5 | |
<<< text/html: EXCLUDED >>>
This is probably better asked on a Microsoft newsgroup.
Volker
"pavel" <pavel@intellisoft.ro> wrote in message
news:c0g2af$1ba$1@motorkatt.troll.no...
Hi,
I have loaded the webbrowser control into a QAxWidget and used the
"Navigate2" method to load a PDF file into the webbrowser. The problem is
that when i call: WebBrowser->querySubObject("Document") i get a
reference to a htmldocument COM object. Does anyone know how can i get the
reference to the Adobe Acrobat Control used to show that pdf file?
Thx
Hi !
Why do you use the webbrowser control to view pdf files ? I think you can
use the Adobe Acrobat Reader ActiveX control directly. The webbrowser
control does the same.
Maybe it helps.
Bye
>From: "Volker Hilsheimer" <vohi@trolltech.com>
>Reply-To: vohi@trolltech.com
>To: qt-interest@trolltech.com
>Subject: Re: ActiveQT + webbrowser control question
>Date: Fri, 13 Feb 2004 10:42:07 +0100
>
>This is probably better asked on a Microsoft newsgroup.
>
>Volker
>
>"pavel" <pavel@intellisoft.ro> wrote in message
>news:c0g2af$1ba$1@motorkatt.troll.no...
>Hi,
>
>I have loaded the webbrowser control into a QAxWidget and used the
>"Navigate2" method to load a PDF file into the webbrowser. The problem is
>that when i call: WebBrowser->querySubObject("Document") i get a
>reference to a htmldocument COM object. Does anyone know how can i get the
>reference to the Adobe Acrobat Control used to show that pdf file?
>
>Thx
>
>--
>List archive and information: http://lists.trolltech.com/qt-interest/
_________________________________________________________________
MSN Messenger - sehen, welche Freunde online sind!
http://www.msn.de/messenger Jetzt kostenlos downloaden und mitmachen!
I tried to use it directly and it works fine with Acrobat 5, but with
Acrobat 6 there are some problems (it hangs sometimes). I tried in the
webbrowser and there it never hangs. :(
----- Original Message -----
From: "stefan frasch" <stefan_frasch@hotmail.com>
To: <qt-interest@trolltech.com>
Sent: Monday, February 16, 2004 10:25 AM
Subject: Re: ActiveQT + webbrowser control question
> Hi !
>
> Why do you use the webbrowser control to view pdf files ? I think you can
> use the Adobe Acrobat Reader ActiveX control directly. The webbrowser
> control does the same.
>
> Maybe it helps.
>
> Bye
>
>
> >From: "Volker Hilsheimer" <vohi@trolltech.com>
> >Reply-To: vohi@trolltech.com
> >To: qt-interest@trolltech.com
> >Subject: Re: ActiveQT + webbrowser control question
> >Date: Fri, 13 Feb 2004 10:42:07 +0100
> >
> >This is probably better asked on a Microsoft newsgroup.
> >
> >Volker
> >
> >"pavel" <pavel@intellisoft.ro> wrote in message
> >news:c0g2af$1ba$1@motorkatt.troll.no...
> >Hi,
> >
> >I have loaded the webbrowser control into a QAxWidget and used the
> >"Navigate2" method to load a PDF file into the webbrowser. The problem is
> >that when i call: WebBrowser->querySubObject("Document") i get a
> >reference to a htmldocument COM object. Does anyone know how can i get
the
> >reference to the Adobe Acrobat Control used to show that pdf file?
> >
> >Thx
> >
> >--
> >List archive and information: http://lists.trolltech.com/qt-interest/
>
> _________________________________________________________________
> MSN Messenger - sehen, welche Freunde online sind!
> http://www.msn.de/messenger Jetzt kostenlos downloaden und mitmachen!
>
> --
> List archive and information: http://lists.trolltech.com/qt-interest/
>
I have two buttons on a dialog. When I clicked either button, I will talk
with another Mainwindow to read data. Now the problem is:
I can click only one button, then it hangs.
w.psDia->show(); //during show time, use Signal and slot to communicate
between this dialog and another
//mainwindow. I can do nothing
if (w.psDia->exec()==QDialog::Accepted){
QMessageBox::information(&w, "aa", "aaa", QMessageBox::Ok);
}
How can I solve this problem? Thanks a lot;
Lihua
On Mon, 16 Feb 2004 00:47:12 -0800
"Lihua Lin" <lihua325@cs.ucsb.edu> wrote:
> I have two buttons on a dialog. When I clicked either button, I will
> talk with another Mainwindow to read data. Now the problem is:
> I can click only one button, then it hangs.
>
> w.psDia->show(); //during show time, use Signal and slot to
> communicate
> between this dialog and another
> //mainwindow. I can do nothing
>
> if (w.psDia->exec()==QDialog::Accepted){
I don't think you are supposed to call both show() and exec() one after
another. Normally, only exec() should be enough.
--
[ signature omitted ]
>
> > I have two buttons on a dialog. When I clicked either button, I will
> > talk with another Mainwindow to read data. Now the problem is:
> > I can click only one button, then it hangs.
> >
> > w.psDia->show(); //during show time, use Signal and slot to
> > communicate
> > between this dialog and another
> > //mainwindow. I can do nothing
> >
> > if (w.psDia->exec()==QDialog::Accepted){
>
> I don't think you are supposed to call both show() and exec() one after
> another. Normally, only exec() should be enough.
>
Then I can't click the dialog. The program just stays there and i can't
click any button on the dialog or activate other frames. This way I still
can only get one button clicked and read information.
Lihua
On Mon, 16 Feb 2004 01:25:00 -0800 "Lihua Lin" <lihua325@cs.ucsb.edu> wrote: > > I don't think you are supposed to call both show() and exec() one > > after another. Normally, only exec() should be enough. > > > > Then I can't click the dialog. The program just stays there and i can't > click any button on the dialog or activate other frames. This way I > still can only get one button clicked and read information. It's not clear to me which of the two dialogs you are referring to, but what you describe looks a lot like the behaviour of a modal dialog. Check the section on modality in the QDialog docs. -- [ signature omitted ]
This happens when you use exec() ?
Can't believe that.
-----Ursprüngliche Nachricht-----
Von: owner-qt-interest@trolltech.com
[mailto:owner-qt-interest@trolltech.com]Im Auftrag von Lihua Lin
Gesendet: Montag, 16. Februar 2004 10:25
An: dazy@earthdecision.com
Cc: qt-interest@trolltech.com
Betreff: Re: Urgent help: QDialog Problem
>
> > I have two buttons on a dialog. When I clicked either button, I will
> > talk with another Mainwindow to read data. Now the problem is:
> > I can click only one button, then it hangs.
> >
> > w.psDia->show(); //during show time, use Signal and slot to
> > communicate
> > between this dialog and another
> > //mainwindow. I can do nothing
> >
> > if (w.psDia->exec()==QDialog::Accepted){
>
> I don't think you are supposed to call both show() and exec() one after
> another. Normally, only exec() should be enough.
>
Then I can't click the dialog. The program just stays there and i can't
click any button on the dialog or activate other frames. This way I still
can only get one button clicked and read information.
Lihua
--
[ signature omitted ]
Here is my code:
class PathSearchDialog : public QDialog {
public:
QPushButton* dstPickPushButton;
QPushButton* srcPickPushButton;
void init(QWidget *m_parent) {
connect(this, SIGNAL(getSrc()), m_parent, SLOT(pickSrcPoint()));
connect(this, SIGNAL(getDst()), m_parent, SLOT(pickDstPoint()));
}
public slots:
virtual void pickSrc();
virtual void pickDst();
signals:
void getSrc();
void getDst();
};
class MainForm : public QMainWindow {
SearchDialog *dia;
public:
init() {
dia = new SearchDialog(this);
connect (this, SIGNAL (returnSrcPoint(float, float, float)),
dia, SLOT(setSrc(float, float, float)));
}
public slots:
pickSrcPoint() {
.....
emit (returnSrcPoint (x, y, z));
signals:
returnSrcPoint(float x, float y, float z);
}
main() {
MainForm w;
if (w.dia->exec()==Dialog::Accepted){
// Display a message
}
}
Now my dialog and mainwindow display on the screen. I click
srcPickPushButton and get the correct x, y, z from mainwindow. The the
problem happens: i can't click on the dialog or the mainwindow.
If I change the line ".. w.dia->exec.." with w.dia->show(), I can click
both pushbuttons and get the correct values. But the code after that were
executed before i finish the click (in this case, the dialog displayed, then
the message showed. I need to get all the data then display the message).
Any idea?
Thanks,
Lihua
> > I don't think you are supposed to call both show() and exec() one
> > after another. Normally, only exec() should be enough.
> >
>
> Then I can't click the dialog. The program just stays there and i can't
> click any button on the dialog or activate other frames. This way I
> still can only get one button clicked and read information.
It's not clear to me which of the two dialogs you are referring to, but
what you describe looks a lot like the behaviour of a modal dialog. Check
the section on modality in the QDialog docs.