Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Regarding Layout Management

    3
    0 Votes
    3 Posts
    2k Views
    L
    I don't think that's the problem. I always construct layouts that way, and have never had any problems. With Qt 3.x you could run into all kinds of problems if you didn't do things in the right order, but with Qt 4.x it tends to just work, regardless of the order in which you create things and put them in the layouts. I think the problem is with the arguments to addWidget. Looks like you are adding btnExport and table in exactly the same place, for example. And btnImport and btnExport are overlapping.
  • Align elements in QHBoxLayout

    4
    0 Votes
    4 Posts
    11k Views
    S
    Try to Align QToolBar vertically: @QHBoxLayout::addWidget(widget, int stretch, Qt::AlignVCenter)@
  • 0 Votes
    2 Posts
    2k Views
    A
    The low pitch problem and the different time needed to fill the buffer seems to indicate you are recording at a higher sample rate on MacOsX than on Windows. Did you check that the format was supported (like in "the example code from QAudioInput documentation":http://doc.trolltech.com/latest/qaudioinput.html#details), and that the "nearestFormat" returned the same sampleRate as the one you requested ?
  • Crash when trying to start KMyMoney with QT 4.7.3 debug version

    13
    0 Votes
    13 Posts
    5k Views
    M
    Sad, but thanks for all your efforts up to now. :-)
  • 0 Votes
    4 Posts
    4k Views
    L
    [quote author="Gerolf" date="1308505407"] An abstract method is a dummy code method which has no implementation. It is often used as a placeholder to be overridden later by a subclass of or an object prototyped from the one that implements the abstract method. In this way, abstract methods help to partially specify a framework. [/quote] Just wanted to add to that, that it is possible to actually implement pure virtual functions and then call them from the derived class (in which you still have to implement it though). So a function can be pure virtual, but not abstract. Another thing as to not confuse the OP, @ QRectF QGraphicsItem::boundingRect () const @ is pure virtual in QGraphicsItem and was just used as an example by Gerolf.
  • Update to a nighty or un-official version?

    9
    0 Votes
    9 Posts
    4k Views
    EddyE
    Glad you like it, but the stuff you are referring to is also accessible "on devnet ":http://developer.qt.nokia.com/resources
  • Socket local address and peer address

    4
    0 Votes
    4 Posts
    9k Views
    G
    The doc is quite clear about that: bq. "QAbstractSocket::localAddress() ":http://doc.qt.nokia.com/4.7/qabstractsocket.html#localAddress: Returns the host address of the local socket if available; otherwise returns QHostAddress::Null. bq. "QAbstractSocket::peerAddress() ":http://doc.qt.nokia.com/4.7/qabstractsocket.html#peerAddress: Returns the address of the connected peer if the socket is in ConnectedState; otherwise returns QHostAddress::Null. Peer in network context always means the other side of the connection (not necessarily remote - you can connect to your local machine too!). So you're right with your assumptions.
  • [Moved] excel puzzle in qt4

    10
    0 Votes
    10 Posts
    4k Views
    G
    That would be a good start :)
  • 0 Votes
    5 Posts
    2k Views
    M
    Nope, unfortunately the above did not solve this issue, as it turned out now. :-(
  • Stylesheet font-size not working with hover

    3
    0 Votes
    3 Posts
    5k Views
    G
    font-size also doesn't work. But I've now created a subclass of QPushButton were I hardcoded the change of the stylesheet in the enterEvent(). That works, the effort is just a little more. But thanks anyway
  • Handling setRestorable on Mac 10.7 Lion

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] How to deploy QtMobility together with an application

    2
    0 Votes
    2 Posts
    2k Views
    U
    Ok, I solved the problem from reading the source code (this is the advantage of open source :O). In file qmediapluginloade.cpp I found the following lines: @ #ifdef QTM_PLUGIN_PATH // Mobility's plugin directory paths << QLatin1String(QTM_PLUGIN_PATH); #endif // Qt paths paths << QCoreApplication::libraryPaths(); @ The plugin loader searches in the QTM_PLUGIN_PATH C:\QtMobility\plugins and in the QCoreApplication library paths. These library paths also contain the path to the application binary. So I simply need to install the mediaservice plugin into myapp/mediaservice/. I tested this and it works.
  • Design button is disabled in Qt-Creator 2.1.0

    7
    0 Votes
    7 Posts
    8k Views
    S
    Tobias, There was no inconvenience. I rather think that it was a learning opportunity for me. I found out about this forum and made my first (albeit minor) contribution to the Qt community. Next challenge for me is to start designing my application (or software system) (it is meant to be a learning exercise of different techniques: Qt, HTML5, "CSLA.net":http://www.lhotka.net/cslanet/, behavioural modelling, persistence frameworks...). I think I have to ask your opinion about some of the issues, but that is a discussion for another thread.
  • [SOLVED]Q_DECL_EXPORT works, but macro not...

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 2nd QInputDialog after QFileDialog immediately closes

    6
    0 Votes
    6 Posts
    6k Views
    L
    It gets worse. I experimented, and it seems that after a call to QFileDialog::getOpenFileName(), many (built-in) dialogs are somehow broken. I confirmed this for QMessageBox and QErrorMessage. Go ahead and change the code in doMain() to this: @ void CMain::doMain() { // check that the message box is working as expected! QMessageBox::information(nullptr, "Test Msgbox", tr("Qt Version: %1").arg(QT_VERSION_STR)); // THIS QFILEDIALOG BREAKS SOMETHING! // comment the next line out to see everything working normal! QFileDialog::getOpenFileName(nullptr, "Open some file", QString(), tr("All files (.)"), nullptr, QFileDialog::ReadOnly); // you'll hear the message box sound, but don't see anything QMessageBox::warning(nullptr, "Test Msgbox 2", "Hi, I'm another msg box"); // the error msg will show up, but it will stay "unusable" in the background // also the program will execute the following file dialog at the same time without waiting QErrorMessage ErrMsg; ErrMsg.setModal(true); ErrMsg.showMessage(tr("This is some sort of error message")); ErrMsg.exec(); // this pops up too early QFileDialog::getOpenFileName(nullptr, "Open another file", QString(), tr("All files (.)"), nullptr, QFileDialog::ReadOnly); cout << "doMain() done. Time to quit()." << endl; qApp->quit(); }//end method @ Comment out the first QFileDialog::getOpenFileName() where the comment suggest it. You'll see the expected behaviour. Now, enable that line, and watch every dialog (except another file dialog) "break" after that line. I've tested this on 2 different machines, both VS 2008, Qt 4.7.1, one Windows 7 32bit, the other WinXP SP3 32bit.
  • Reading Data from CSV FILE

    7
    0 Votes
    7 Posts
    46k Views
    L
    There are plenty of implementations around the internet, just use google. Otherwise you can have a look at the "specification":http://tools.ietf.org/html/rfc4180 and write one yourself for fun/practice. Use Layouts, have a look at the "documentation":http://doc.qt.nokia.com/4.7/layout.html and if you have specific questions, you can always ask (try to figure it out yourself with the documention, though)
  • TableView with header and footer for sums, avg and so on

    6
    0 Votes
    6 Posts
    5k Views
    G
    this goes in directtion of "this":http://developer.qt.nokia.com/forums/viewthread/1978/ topic. From my point of view, you need external tools (like that from ICS), as I think the sollution proposed in the docs (2 views, on rfixed, one scrolling) has some unusual behavior issues (moving focus by keys to the fixed rows etc.).
  • Can Qt host WPF controls?

    12
    0 Votes
    12 Posts
    10k Views
    V
    Maybe this can help you http://www.codeproject.com/KB/toolbars/Ribbon.aspx
  • 0 Votes
    4 Posts
    3k Views
    L
    You're welcome! Don't forget to add "[Solved]" to the thread title if it has been solved for you.
  • [SOLVED] [QComboBox and PSQL] Access PK from another column in the table

    5
    0 Votes
    5 Posts
    3k Views
    L
    I think it's because QSqlRecord uses it only as a key by which to access the field. It is therefore not part of a query to the database (or at least it is not inserted directly into an SQL query) and doesn't need the quotes (which AFAIK you really don't need anyway if you query doesn't contain any whitespaces). Another thing, if you are using MySql (the only database I have experience with, I don't know about other databases) you could also use `` or ' ' as quotes.