[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bindings
Subject: Re: [Kde-bindings] Qt, Qyoto buttons work intermediately
From: linuxoidoz () yahoo ! com ! au
Date: 2010-02-14 12:26:41
Message-ID: 201002142226.41985.linuxoidoz () yahoo ! com ! au
[Download RAW message or body]
I'm completely lost. No controls work in the second window. Sometimes 1 out 20, the \
buttons work but then stop again. What the... I have these:
mainwin = new QMainWindow(MainWindow);
...
QObject.Connect(txtSource, Qt.SIGNAL("textChanged()"), mainwin, \
Qt.SLOT("updateFilename()")); QObject.Connect(btnSource, Qt.SIGNAL("clicked()"), \
mainwin, Qt.SLOT("GetSource()")); QObject.Connect(btnDestination, \
Qt.SIGNAL("clicked()"), mainwin, Qt.SLOT("GetDestination()")); \
QObject.Connect(btnStart, Qt.SIGNAL("clicked()"), mainwin, Qt.SLOT("StartCodec()")); \
QObject.Connect(btnQuit, Qt.SIGNAL("clicked()"), Qt.qApp, Qt.SLOT("quit()")); \
QMetaObject.ConnectSlotsByName(mainwin); }
[Q_SLOT]
private void updateFilename() {
txtFilename.Text = txtSource.Text;
btnStart.SetEnabled(true);
}
[Q_SLOT]
private void GetSource() {
string fileName = QFileDialog.GetOpenFileName();
txtSource.Text = fileName;
}
[Q_SLOT]
private void GetDestination() {
string fileName = QFileDialog.GetOpenFileName();
txtDestination.Text = fileName;
}
[Q_SLOT]
private void StartCodec() {
string param = "kwrite " + txtSource.Text;
QProcess play = new QProcess(mainwin);
play.Start(param);
}
I've just tried putting everything on the first window and all controls work just \
fine. But none work on the second window which I open from the first and pass its \
parent reference to.
Could it be something wrong with my class constructors/references?
Will really appreciate your help.
------------------ Original Message ------------------
Subject: [Kde-bindings] Qt, Qyoto buttons work intermediately
Date: Sun, 14 Feb 2010
From: linuxoidoz@yahoo.com.au
To: kde-bindings@kde.org
> Don't know if this is a Qyoto bug or I'm doing something wrong. When I build my \
> project and click buttons sometimes they work, sometimes they don't. If I rebuild \
> it, then they might start working or stop. Really strange.
> I have these functions:
>
> QObject.Connect(btnSource, Qt.SIGNAL("clicked()"), MainWindow, \
> Qt.SLOT("GetSource(MainWindow)")); QObject.Connect(btnAbout, \
> Qt.SIGNAL("clicked()"), MainWindow, Qt.SLOT("ShowAbout(MainWindow)"));
> [Q_SLOT]
> private void ShowAbout(QMainWindow win) {
> QMessageBox.About(win, "About", "About Project");
> }
>
> [Q_SLOT]
> private void GetSource(QMainWindow win) {
> fileDialog = new QFileDialog(win);
> string folderPath = "";
> folderPath = fileDialog.Directory().ToString();
> }
>
>
> The ShowAbout sometimes shows the message, sometimes it doesn't, the GetSource \
> never works. What am I doing wrong? Thank you.
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic