Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • QRegExp string matching fails

    7
    0 Votes
    7 Posts
    5k Views
    S
    After a long, long way of try and error it somewhat worked. I guess it had something to do with the format the data was recieved from my device. But thank you anyway for your help! Much appreciated =)
  • QIODevice and Phonon

    4
    0 Votes
    4 Posts
    3k Views
    A
    About generator, maybe this is what you need :http://developer.qt.nokia.com/doc/qt-4.8/multimedia-audiooutput.html . So as you see you can create QIODevice based class which will generate frequency or any else.
  • Strange start byte PNG from QDataStream

    10
    0 Votes
    10 Posts
    4k Views
    T
    Any PNG file starts with some magic bytes. So using QDataStream is not an option for you if you want to produce PNG output. Modifying your reader to accept a non-PNG file as PNG is not a solution IMHO. Better do what Volker suggested and use the QFile API instead of the datastream.
  • How to perform auto scrolling in QTAbleWidget?

    4
    0 Votes
    4 Posts
    9k Views
    A
    ok thank u... I used scrolltoItem() It works....:)
  • Changing width / height of played video file on phonon video widget

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Image Plugin Strangeness

    1
    0 Votes
    1 Posts
    784 Views
    No one has replied
  • [SOLVED] how to disconnect a certain client user from server

    17
    0 Votes
    17 Posts
    11k Views
    T
    Thanks, folks. Let's try not to yell at each other and be constructive, both on the asking and the replying end. All good, carry on. :)
  • [Solved] QWidget children problem

    6
    0 Votes
    6 Posts
    4k Views
    J
    If I don't put parent this as parent, I got that error message : @ main_window.o: In function MainWindow::openOptions()': main_window.cpp:(.text+0x35e2): undefined reference to ConfigWindow::ConfigWindow()' collect2: ld returned 1 exit status make: *** [QNotepad] Error 1 @ And when I put this as parent everything work pefectly. ;-) Thank you
  • Library Issues (SDL)

    5
    0 Votes
    5 Posts
    3k Views
    B
    Hi Hostel, It was for the Cornerstone SDK; I had been using 1.1.2, and upgraded to 1.2.0. The changes I needed to make were to add the following lines to my .pro file: @INCLUDEPATH += /opt/multitouch/include QMAKE_LIBDIR += /opt/multitouch/lib@ After that, everything worked beautifully. :)
  • [Beginner Question] Cannot get this Code to run

    7
    0 Votes
    7 Posts
    2k Views
    D
    Yea, thank you i will declare it better in my next little failure programms :)
  • Video streaming with qt

    2
    0 Votes
    2 Posts
    4k Views
    S
    Hi, the source is according to phonon architecture explained in http://doc.qt.nokia.com/4.7/phonon-overview.html should be like: for example suppose you are going to play fileName: @ QString fileName = "video1.avi"; Phonon::MediaSource *mediaSource = new Phonon::MediaSource(fileName); media->setCurrentSource(*mediaSource);@ You set it once and then play by invoking media->play()
  • Problem in getting system domain or connected workgroup name.

    3
    0 Votes
    3 Posts
    3k Views
    M
    Thanks Lukas..for your valuable inputs.
  • How to read data from QTableView?

    4
    0 Votes
    4 Posts
    6k Views
    B
    Reading data: @ item(row, YourColumnNameAsConstansString)->text() @ or a similar: @ static_cast<quint16>(item(row, YourColumnNameAsUInt16)->data(Qt::EditRole).toUInt()) @ item is a QStandardItem. In QStandardItemModel you can retrieve the index or item with these: itemFromIndex() and indexFromItem().
  • Running a Perl module in Qt

    21
    0 Votes
    21 Posts
    15k Views
    V
    I've used QProcess to access external applications on my linux box multiple times without flaw. I also had issues like you are having right now being that I could run the application on the command line with no errors, and then I tried using QProcess and had issues all around. My solution was following the exact example on the QProcess page using the argument string lists, checking for errors, and all that jazz. For example (right from the QProcess documentation) @ QObject *parent; ... QString program = "./path/to/Qt/examples/widgets/analogclock"; QStringList arguments; arguments << "-style" << "motif"; QProcess *myProcess = new QProcess(parent); myProcess->start(program, arguments); @ Just a thought though. Here's the docs if you haven't already been there. http://developer.qt.nokia.com/doc/qt-4.8/qprocess.html I think when I was having issues, the QProcess line recognized some characters differently then what the command line does. So an argument string list was absolutely required for my case. Also, put ' ' around your arguments as well. Best of luck.
  • How to change the background colour of the QTableWidget?

    4
    0 Votes
    4 Posts
    6k Views
    A
    But my problem not yet solved.... I tried to change its color as u told, it changes background color of all the items except the item which i changed before... Actually in my program i'm using a table widget and performing seraching operation on it.... Whenever a item found with given search key, i'm changing its background colour to red....i'm providing "NEXT" and "PREv" button, which changes background of one after the other found item... But problem is that---1.At the begin i'll highlight the first found item, by changing its background color to red, when i click on "next", only that next item must highlight but in my case previously item not changing back its color to default white..... 2. If i change the search key also, previously highlighted items(which is red background) not changing to default white color..... my code is as follows... @ void MainWindow::FilterCurrentTab(void) { temp= dynamic_cast<QTableWidget*>(ui->tabWidget_2->currentWidget()); if (temp == NULL) { std::cout<<"Error. No Table widget found in Tab\n"; return; } QTableWidgetItem *rowPtr; QPalette p=temp->palette(); p.setColor(QPalette::Background,Qt::white); <----when next search begins all item will be in white background temp->setPalette(p); QString SearchKey=ui->lineEdit_FilterKey->text(); LTempTable =temp->findItems(SearchKey,Qt::MatchExactly); Findcounter=0; LTempTable.at(0)->setBackground(Qt::red); temp->scrollToItem(rowPtr,QAbstractItemView::EnsureVisible); } @ @ void MainWindow::on_pushButton_findPrev_clicked() { QPalette p=temp->palette(); p.setColor(QPalette::Background,Qt::white); temp->setPalette(p); Findcounter=Findcounter-1; cout<<"THE FIND COUNT:"<<Findcounter<<endl; LTempTable.at(Findcounter)->setBackground(Qt::red); temp->scrollToItem(LTempTable.at(Findcounter),QAbstractItemView::EnsureVisible); } @ @ void MainWindow::on_pushButton_FindNext_clicked() { QPalette p=temp->palette(); p.setColor(QPalette::Background,Qt::white); temp->setPalette(p); Findcounter++; cout<<"THE FIND COUNT:"<<Findcounter<<endl; LTempTable.at(Findcounter)->setBackground(Qt::red); temp->scrollToItem(LTempTable.at(Findcounter),QAbstractItemView::EnsureVisible); } @ please help me to solve this problem.. Thanks in advance...
  • Profiling Qt app with very Sleepy , how to analyze the results?

    2
    0 Votes
    2 Posts
    3k Views
    T
    You did not provide enough information to come up with any sensible suggestion for improvement. Generic idea: What happens during each "add to list operation"? Does this addition ripple through the code, triggering updates in other places? Does it require redraw operations? How expensive are those?
  • How to divide Left Dock vertically ?

    4
    0 Votes
    4 Posts
    2k Views
    S
    Anticross, Maxim, Thanks for the help. I'm using Qt3. I did it like this... mainWin->addDockWindow( dwinTop, DockLeft, FALSE ); ..... mainWin->moveDockWindow( dwinBottom, DockLeft, FALSE, 1, 0 ); thanks again........
  • Qt Creator: No debug with source

    4
    0 Votes
    4 Posts
    3k Views
    T
    Sorry I have to nitpick here: Qt Creator does not create the Makefiles at all. CMakes does that. Creator starts cmake for you, yes, but it is your responsibility to "do the right thing". The format of those cmakelists.txt files is so complex that we can not really do more from inside Qt Creator.
  • How to get complete row from qtable widget?

    6
    0 Votes
    6 Posts
    5k Views
    A
    Ok thanks all..:)
  • Save TagLib tags while playing music

    3
    0 Votes
    3 Posts
    2k Views
    B
    Thank you for reply, but yesterday evening I've solved this problem. VLC backend for Phonon was needed.