Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • 0 Votes
    8 Posts
    3k Views
    R
    [quote author="Rajveer" date="1320743912"]Hi Andre How to add image file in post please tell so that i can add image to show what i want to read from QTableView.[/quote] For example "postimage":http://postimage.org/ !http://postimage.org/image/4sumhxkgb/(stepashka)!
  • Format percentage column

    10
    0 Votes
    10 Posts
    9k Views
    A
    A lot of thanks, now I understand how it works!
  • Urgent help required !!! How to read the tableview index number?

    6
    0 Votes
    6 Posts
    4k Views
    F
    Hi, Well, your correct. Since I was posting this question behalf of my friend and I think i'm lacking the understanding of his requirement. Now, I've requested my friend to post directly his requirement. Sorry for higlighting it!!!
  • How to change taskbar icon during runtime on windows

    6
    0 Votes
    6 Posts
    9k Views
    F
    If I get it right the taskbar is showing the exe icon while you want another icon. As Broadpeak explained, the icon in the taskbar is platform dependent and depends on how the application "taskbar" on windows manages icons. I don't think there is a common and simple solution for this.
  • Set pixels of RowWrapPolicy::WrapLongRows

    3
    0 Votes
    3 Posts
    2k Views
    E
    Thank you for your answer! I have tried @formLayout->setRowWrapPolicy(QFormLayout::WrapLongRows);@ already, but then it only wraps when the whole row is filled by text. I'm sorry, but how can I set the sizeHint()? I would like the first column to be fixed and the second column should expand. Or for example set the ratio of the width of the columns (e.g. 1:2).
  • 0 Votes
    5 Posts
    2k Views
    R
    [quote author="Andre" date="1320734170"]Moved to General & Desktop (from Quick), as I think it belongs here.[/quote] Thank's Andre.
  • QListWidgetItem

    3
    0 Votes
    3 Posts
    2k Views
    M
    Oh thank you very simple. Regards
  • [SOLVED] Additional widget like in QComboBox

    8
    0 Votes
    8 Posts
    6k Views
    R
    Thanks. QComboBox::setModel() helps.
  • Reusing QtCore module in any C++ project

    9
    0 Votes
    9 Posts
    4k Views
    A
    I think signal/slot handling can be done without having an eventloop, but only if you use direct connections only. By default, signal/slot connections are direct, unless the thread the emit happens in is different from the thread in which the object lives. In that case, a Queued connection is used, which does need an eventloop. Lukas already explained that earlier in this topic. QObject is quite fundamental to using any of the nice Qt features, so I see little chance of getting around it. However, I think quite a bit can be done without using a QCoreApplication, though I think GUI stuff and sockets and the likes of those are off.
  • Setting volume in Phonon

    7
    0 Votes
    7 Posts
    5k Views
    J
    mohsen> I haven't compiled it myself. I use the program many different computers and it works the same on all of them. I don't want to control master volume, I want to control the volume internally. So this works OK for me, just the change in dB seems to be bigger then I intent. Regarding QtMultimediaKit, I plan to switch to it. But the last time I tried it, it didn't work on Windows. There was no binary available and when I tried to compile it myself, it always failed (with both MinGW and MSVC). I'll check it again but I'm afraid there won't be any change before Qt 4.8.
  • How to show distinct rows in QSqlTableModel filter?

    4
    0 Votes
    4 Posts
    7k Views
    F
    Please note that the proxy solution is fine if you don't have a lot of duplicate rows. In such case in fact, you will query all the database rows and drop them later, which can be bandwidth and time consuming. The best solution is to drop to SQL, after all if you are going to do such a filtering chances are you will need complex queries later on.
  • [Solved] Validating when a button is pressed

    3
    0 Votes
    3 Posts
    2k Views
    F
    [quote author="saho" date="1320674768"] But is it also possible to let the user enter everything and check afterwards if it is a valid input? [/quote] Connect a slot to the focus signals (which one you are interested in) and call the validator's validate method there, without having to tying the validator to the line editor.
  • Phonon::VideoPlayer

    2
    0 Votes
    2 Posts
    3k Views
    B
    For starting (from this book: "Advanced Qt Programming"): @ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { playIcon = QIcon(":/play.png"); pauseIcon = QIcon(":/pause.png"); mediaObject = new Phonon::MediaObject(this); mediaObject->setTickInterval(OneSecond); videoWidget = new Phonon::VideoWidget(this); Phonon::createPath(mediaObject, videoWidget); audioOutput = new Phonon::AudioOutput(Phonon::VideoCategory, this); Phonon::createPath(mediaObject, audioOutput); createActions(); createToolBar(); createWidgets(); createLayout(); createConnections(); setWindowTitle(QApplication::applicationName()); } ... // i.e: one method of the others: void MainWindow::playOrPause() { switch (mediaObject->state()) { case Phonon::PlayingState: mediaObject->pause(); playOrPauseAction->setIcon(playIcon); break; case Phonon::PausedState: // Fallthrough case Phonon::StoppedState: mediaObject->play(); playOrPauseAction->setIcon(pauseIcon); break; default: break; } } @ Edit: please use @ tags around code sections; Andre
  • Communicating with external device

    6
    0 Votes
    6 Posts
    2k Views
    S
    thanks! =)
  • Indentation of QWidgets

    4
    0 Votes
    4 Posts
    4k Views
    A
    Would that work with, for instance, a QGroupBox?
  • [closed]Rean an xml and create checkboxes

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    A
    Closed. Annatz, you have opened more than enough topics on this application of yours and the XML file reading & writing that comes with it now.
  • How to avoid user from entering special characters into QTableWidget Cell

    3
    0 Votes
    3 Posts
    3k Views
    K
    isn't that just like "this":http://developer.qt.nokia.com/forums/viewthread/10858/ ?
  • How to read the version details programatically.

    4
    0 Votes
    4 Posts
    4k Views
    C
    I would follow Andre's advice. But if you really need to put version information in your application or DLL, you should use "VerQueryValue":http://msdn.microsoft.com/en-us/library/windows/desktop/ms647464(v=vs.85).aspx Be aware of bq. you must first call the GetFileVersionInfoSize function, and then the GetFileVersionInfo function.
  • SetStatusBar does not work from a different window

    4
    0 Votes
    4 Posts
    3k Views
    D
    Ok, thanks for the answer ! The small improvement doesn't worth the extra coding, so I guess popping tool tips will be enough for this window :)
  • Mouse events sent to wrong widget (QTableView as QSplitter child)

    5
    0 Votes
    5 Posts
    3k Views
    G
    I'm closing in on the cause of the problem: at the moment it looks like there may be some interference from some network activity (we react to the selection change by making a SOAP call using IPWorks). Removing the SOAP call also gets rid of the problem (unfortunately also of the functionality of the dialog) which would explain why I can't reproduce it in a simple tester and nobody else has encountered this. I'm afraid I'll have some long hours of debugging in front of me...