Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • [Solved] QMenuBar && menu's order

    7
    0 Votes
    7 Posts
    6k Views
    L
    Ok, I solved inserting the "Help" menu too with insertMenu() instead of addMenu() so I get a QAction that I can use for all the menus I must insert before "Help". Thanks.
  • How to access QT element from different file

    4
    0 Votes
    4 Posts
    5k Views
    G
    No, you don't. You have @ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT private: Ui::MainWindow *ui; }; @ which means, you have a pointer to the ui. This means, you must use text edit like this: @ ui->textEdit->setText("test"); @
  • 0 Votes
    4 Posts
    3k Views
    T
    thank you, looked at event, but don't know how I missed the button()... stupid me.. :)
  • What is the maximum length of string that QString object can hold?

    7
    0 Votes
    7 Posts
    23k Views
    A
    2^30 is 1073741824 characters, but QString being UTF16, that means a memory usage of 2.147.483.648 bytes, plus some additional bytes around that. For a single piece of data in your application. That's 2 GB worth of data, if I'm not mistaken. Not the best idea to keep that in a single block of memory, and then I am not even talking yet of temporaries that might also be in memory at the same time (like a byte array of the same size from a file you just read, for instance). To summarize: if you find yourself wondering about reaching this limit, you had better start wondering about your design at a more fundamental level.
  • Searching in directories

    4
    0 Votes
    4 Posts
    2k Views
    M
    [quote author="Vass" date="1318337511"]Try look to [[Doc:QFileInfo]] class. Also I recommend you look to [[Doc:QDirModel]] and [[Doc:QFileSystemModel]] classes.[/quote] Oh... I've posted mine without refreshing :/ You can use both. Qdir to list, QFileInfo to get the... File info ;)
  • Scroll Area and Widgets repaint

    6
    0 Votes
    6 Posts
    4k Views
    G
    it shopuld be clipped by the base system, so normaly, I would say: nothing to be done here.
  • [Solved]how to get special path in mac

    4
    0 Votes
    4 Posts
    4k Views
    V
    @Lucas QDesktopServices::storageLocation() is good point, I'm totally forgot about this. :)
  • [Solved]Listview columnheaders

    11
    0 Votes
    11 Posts
    5k Views
    T
    I found what i was lokking for when i tested Treeview
  • QFileDialog doesn't list tty* files in /dev/ on Linux

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Draw an arc with QPainter

    3
    0 Votes
    3 Posts
    6k Views
    M
    Thanks I'ill try this way.
  • QtHelp include not found

    8
    0 Votes
    8 Posts
    5k Views
    L
    No. By feature I mean qmake "configuration features":http://doc.qt.nokia.com/stable/qmake-advanced-usage.html#adding-new-configuration-features found in $QTDIR/mkspecs/features. I took a quick look at it and it looks like that the test feature is called testlib, not test. So it is either QT += testlib or CONFIG += test. However, do yourself a favor and do not use module wide includes like #include <QtTest>. It is a bad habit and it will strike back at you and you will end up in fixing it somewhen.
  • Can we set id for image or pixmap?

    9
    0 Votes
    9 Posts
    4k Views
    L
    This is a feature unique to QButtonGroup. See Vass' post for a solution. Depending on how you manage the lifetime of your objects you might use QHash<int, QImage*> instead.
  • [Closed] QStandardItem - parent-child with multiple columns

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    A
    You "already":http://developer.qt.nokia.com/forums/viewthread/10461/ asked that question. Please do not double post. I am closing this topic.
  • [SOLVED]switch columns in a QSqlRelationalTableModel

    5
    0 Votes
    5 Posts
    3k Views
    EddyE
    Great! Could you edit your title and add [solved] in front of it? Thanks.
  • 0 Votes
    2 Posts
    2k Views
    K
    solved. i needed the following code. @ tc.movePosition(QTextCursor::End); plainTextEdit->setTextCursor(tc);@
  • Problem with using .qml files in .cpp file

    9
    0 Votes
    9 Posts
    4k Views
    C
    you can use applicationviewer from qt qml.
  • QLineEdit with auto completion from middle of the text

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • How can i call a function with three arguments while a button is clicked?

    8
    0 Votes
    8 Posts
    4k Views
    P
    ok i will try.............
  • How can I catch Shift + Ctrl key?

    3
    0 Votes
    3 Posts
    3k Views
    M
    I think there is lucking code or may be there is something wrong with the system.
  • How can I hide cursor or set it unblinking in QTextEdit?

    4
    0 Votes
    4 Posts
    9k Views
    M
    For blink rate, you can try @ qApp->setCursorFlashTime(0); @