Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • How to speed up inserting records into MySQL Server 5.5

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QSqlTableModel with custom sql queries

    2
    0 Votes
    2 Posts
    3k Views
    C
    First see if QSqlRelationalTableModel scratches your itch. Alternatively write your own QSqlQueryModel subclass that allows editing (see the query model example for a basic version). You might also see if writing through a MySQL view is possible and, if so, can solve your problem.
  • Qmake: import an OSX framework from ~/Library/Frameworks

    4
    0 Votes
    4 Posts
    9k Views
    T
    Thanks Volker. I still think that is still sort of badly designed... Let me add something else, I wish Qt created its own "framework" structure, which a qt user could then use to organize his project in a cross platform fashion... Perhaps with the ability to contain compiled binaries for a number of operating systems. I find it terribly annoying that Qt goes a long way toward cross-platform, yet it stops one step short...
  • 0 Votes
    2 Posts
    2k Views
    R
    you could use insertItem() instead of addItem() to add new items...
  • Add some function to reimplement method

    3
    0 Votes
    3 Posts
    2k Views
    R
    that is correct... although you might want to do it the other way round-QTextEdit::mouseDoubleClickEvent(e) after your code... in this case it doesn't matter, but in some cases it might
  • QT display question??

    4
    0 Votes
    4 Posts
    1k Views
    R
    don't know about append()...but you can achieve what you want by this: @ QTextCursor *cursor=myTextEdit->textCursor(); cursor->insertText(stringToBeInserted); //...or cursor->insertText(stringToBeInserted,charFormatToBeUsed); @
  • Newbee question on QTreeView with QStandardItem and QStandardItemModel

    2
    0 Votes
    2 Posts
    2k Views
    D
    First define your own QVariant for that handle type (see http://qt-project.org/doc/qt-4.8/qmetatype.html ), then use setData and data functions of QStandardItem to store/retrieve it, with an own type id, e.g. Qt::UserRole+1.
  • [SOLVED]How to prevent multiple instances of application

    6
    0 Votes
    6 Posts
    20k Views
    L
    You're welcome. Please feel free to prepend your initial title with [Solved] to indicate that there is a solution inside.
  • QTextEdit and URL clicked signal

    4
    0 Votes
    4 Posts
    3k Views
    P
    I have solution QTextEdit::anchorAt()
  • [SOLVED] How to vary drag and drop flags?

    4
    0 Votes
    4 Posts
    3k Views
    G
    Oh, I just forgot to mention another method: startDrag(). So this is what I have reimplemented in my tree view: "QAbstractItemView::startDrag() ":/doc/qt-4.8/qabstractitemview.html#startDrag "QAbstractItemView::dragEnterEvent() ":/doc/qt-4.8/qabstractitemview.html#dragEnterEvent "QAbstractItemView::dragMoveEvent() ":/doc/qt-4.8/qabstractitemview.html#dragMoveEvent "QAbstractItemView::dragLeaveEvent() ":/doc/qt-4.8/qabstractitemview.html#dragLeaveEvent "QAbstractItemView::dropEvent() ":/doc/qt-4.8/qabstractitemview.html#dropEvent
  • Qt connecting to a remote MySQL server

    2
    0 Votes
    2 Posts
    2k Views
    G
    Purele speaking of Qt: yes, if the underlying mysql drivers support it. I'm not 100% sure, but as far as I remember, the drivers are backwards compatible, so you should be able to connect to an older server with a newer driver. But why don't you just try it in your current setup? Just fire up the mysql command line tool and try to connect...
  • Blank spreadsheet like table using QTableView

    2
    0 Votes
    2 Posts
    2k Views
    G
    You can use a [[Doc:QSqlTableModel]] and set it on a [[Doc:QTableView]]. I'll leave it to you to find the snippets in the two linked doc pages :-)
  • How to create a simple box like layout

    11
    0 Votes
    11 Posts
    4k Views
    W
    [quote author="developer" date="1340529246"]OK @ Wilk i will use Punctuation in my Posts.[/quote] Thank you for understanding.
  • Updating QAction shortcuts text

    8
    0 Votes
    8 Posts
    3k Views
    R
    could you give a stripped down version of how exactly you are doing it(in code)? maybe that'll shed some light on what's going on...
  • Reading input from a textedit

    4
    0 Votes
    4 Posts
    22k Views
    R
    @QString lineEditText = myLineEdit->text();@ @QString textEditText = myTextEdit->toPlainText();@
  • QTableWidget process list

    2
    0 Votes
    2 Posts
    2k Views
    Q
    I fixed it myself. Very simple solution because I am a moron. I changed this: @lul.fromWCharArray(processInfo->szExeFile);@ to this to get it working @lul = lul.fromWCharArray(processInfo->szExeFile);@
  • Two Windows

    10
    0 Votes
    10 Posts
    6k Views
    E
    Cool, look great, will try tomorrow, now is too late (or early) at my place (2:00AM) tnx
  • Load plugin depending on file extension

    6
    0 Votes
    6 Posts
    2k Views
    L
    You cannot use a string (neither a std::string nor a QString) as switch expression. because it is not an intergal type. But you can of course, or better you will have to, use if ... else clauses.
  • QTreeView Node value not getting updated

    2
    0 Votes
    2 Posts
    1k Views
    G
    How do you change the data? If you have your own model, do you emit dataChanged() signal after successfully storing your data in the setData() method?
  • Linux threading seems to be broken with Qt 4.8.0

    5
    0 Votes
    5 Posts
    2k Views
    G
    If you use the very same database connection on two different threads, you might run into problems. The database classes are not thread safe! You will need distinct connections for each thread.