Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

Qt Desinger, lineEdit Problem

Hi guys, ım working on QtDesinger to make some basic app.So I got little weird problem today.There following codes ;

PHP Code

<?php 
void MainWindow
::on_pushButton_2_clicked()
    
QString str = ui->lineEdit->text();
    
QMessageBox::information(this, "Hello World!", str);
} 

I'm writing to lineedit bla bla etc.. not return anything on my QMessageBox.I already check syntax just in case, but im really do not see anything wrong(but im still not sure)


[img]http://i.hizliresim.com/rQV8a3.png[/img]



Any idea what its return null ? 😧
Does the lineEdit have a string in it?

Are you even sure it's null, and not just an empty string?
(May 1, 2015 06:02 AM)TheComet Wrote:  Does the lineEdit have a string in it?

Are you even sure it's null, and not just an empty string?

Of course it does.I'm try %100 same way with that video ;

(2.45-2.56) Check it u can understand what I try to do.

https://www.youtube.com/watch?v=XauEGKUh...3&index=16
What happens if you change it to this?

PHP Code

<?php 
#include <iostream>

void MainWindow::on_pushButton_2_clicked()
    
QString str = ui->lineEdit->text();
    
QMessageBox::information(this, "Hello World!", "This message should appear!");
    
std::cout << "String in message box is: \"" << str << "\"" << std::endl;
} 

What output do you get in the console?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by itcorpMar 1, 2019 03:24 PM 3 248 Mar 1, 2019 03:24 PM
Last Post: itcorp
[.NET] by MaxPain_^Sep 17, 2010 10:09 PM 2 41 Sep 17, 2010 10:09 PM
Last Post: MaxPain_^