Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • SetFocus on widget in a new

    2
    0 Votes
    2 Posts
    30k Views
    M
    @QWidget obj = (QWidget)m_formCategories->children().at(0); obj->setFocus();@
  • 0 Votes
    5 Posts
    5k Views
    A
    That big X is not part of your Qt application. It is up to the window manager to style it.
  • How to get dll release with Qlibrary

    3
    0 Votes
    3 Posts
    3k Views
    G
    There is no cross platform possibility to store the version info inside a dll. Even on Linux, I know no one. There, some libs have the version number in the name, but not all, but AFAIK they have no vendor info compiled in. So, use the platform APIS for such things.
  • Cleaning up after a thread correcly

    42
    0 Votes
    42 Posts
    38k Views
    F
    Looks like: https://qt.gitorious.org/qt/qt/commit/25c9b6ed
  • Tutorials/documentation about creating Qt-themes?

    3
    0 Votes
    3 Posts
    5k Views
    EddyE
    There is a chapter dedicated to this subject in the official Qt book "C++ GUI Programming with Qt 4":http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip
  • How to disable Unicode rendering?

    12
    0 Votes
    12 Posts
    6k Views
    A
    No, I don't think there is a way. This is not something Qt offers as a simple flag.
  • QListWidget Iterating

    2
    0 Votes
    2 Posts
    2k Views
    P
    No, QListWidget doesn't use linked list, it uses model-view architecture. If you don't specify model it creates QListModel implicitly.
  • Problem while saving the graqphics rectitems into a text file

    2
    0 Votes
    2 Posts
    2k Views
    S
    how can i access parent child items loop by loop.. can some one please tell me
  • Errors of undefined reference to "..."

    7
    0 Votes
    7 Posts
    4k Views
    A
    Mostly because you splitted between the template definition and declaration. C++ doesn't allow this, template function must be placed in header file. "C++ FAQ had it":http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12
  • Keep making a widget as always on top

    6
    0 Votes
    6 Posts
    10k Views
    N
    Got it. Thank you. I used isminimized, and if yes then shownormal() ;
  • [Solved]#123456 to corresponding text

    2
    0 Votes
    2 Posts
    2k Views
    P
    Fixed! @ QString name = curveParms->curveColor().name(); QStringList colorNames = QColor::colorNames(); for (int i = 0; i < colorNames.count(); ++i) { QString cn = colorNames[i]; QColor color(cn); if(color.name().compare(name) == 0) { name = cn; } } v = QVariant(name); @
  • App performance reduce with remote mysql server

    9
    0 Votes
    9 Posts
    5k Views
    R
    Thanks for your coincidence I agree with @andre i need to use thread because gui is locked when querying data or submitting data to remote server...can any one tell how work well thread with sql please .........
  • How to set TableWidget Header Vertical?

    2
    0 Votes
    2 Posts
    2k Views
    EddyE
    Have a look at "this thread":http://developer.qt.nokia.com/forums/viewthread/5062/P15.
  • "Rendering" QGraphicsDropShadowEffect in another thread ?

    5
    0 Votes
    5 Posts
    3k Views
    R
    Is there any tutorial for a drop-shadow with OpenGL and shaders? (I've never done some opengl stuff :D)
  • About server platform

    2
    0 Votes
    2 Posts
    2k Views
    M
    A very open question :) Do you have some more detail to share?
  • Populating a TableWidget...Best Way of doing it?

    3
    0 Votes
    3 Posts
    2k Views
    G
    First, please re-edit your post an indent your code, it's quite unreadable this way. For your actual problem: You set the items in your loops and in the end you destroy all the work you've done by setting a new (and empty!) model on your table widget. The way to go is: Either use [[Doc:QTableWidget]] together with [[Doc:QTableWidgetItem]]s Or use [[Doc:QTableView]] together with a [[Doc:QStandardItemModel]] You should not mix a QTableWidget with any item model, being it standard or custom.
  • Qt issues with temporary tables, QODBC/MS SQL Server

    4
    0 Votes
    4 Posts
    4k Views
    G
    Maybe just calling the first select creating the temp table can be moved to a simple [[Doc:QSqlQuery]] call. This way you would save yourself a reset on your model.
  • QVariant activeqt question

    2
    0 Votes
    2 Posts
    2k Views
    G
    QVariant != VARIANT!!! the thing you have to do it this way in MFC is that VARIANT is a structure so it has no constructor. In MFC you could use CVariant which does this implicitly. I'm not 100% sure what to do in ActiveQ there
  • QSqlQuery bindValue slow

    2
    0 Votes
    2 Posts
    2k Views
    F
    Uhm...there could be a little difference, but should not be such the one you reported. You have to understand that given a completed query allows the optimizer to choose in advance the right/best plan, giving a prepared statement makes the optimizer to guess and to rebuild the plan once the values are known. You can test the same prepared query from the console too, and see if the problem persist. Anyway, take into account that testing the same query over and over again is a bad idea: the database will cache data and the execution of the same query will result faster. Finally, you can enable verbose logging to see which plan the database choose and compare it against the complete query.
  • How to align pushbutton

    6
    0 Votes
    6 Posts
    9k Views
    D
    [quote author="andyc" date="1319583136"]Hello, how i can i allign my pushbutton in the centre of the mainwindow ? ive been googling for a while, and didnt find any answer... also, i would like to have my button in the centre of the window even if the window is resized... Best regards, OSiRiS[/quote] Do you mean like using a layout? Otherwise, can you elaborate?