跳到內容

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k 主題 456.4k 貼文
  • Library Requirment for Running OpenGL Applications.

    1
    0 評價
    1 貼文
    2k 瀏覽
    尚無回覆
  • [SOLVED] Name mangling when building qt applications

    5
    0 評價
    5 貼文
    3k 瀏覽
    T
    Note that nm can demangle the symbols for you (--demangle) and you also use the c++filt utility to demangle a single symbol (e.g. one the linker is complaining about).
  • [Solved] Displaying an image in a QTableView

    4
    0 評價
    4 貼文
    5k 瀏覽
    G
    No problem, I just read through a huge backlog of postings :-) I'm setting this to solved.
  • Qt Meta-Object System and virtual functions with multiple inheritance - unexpected behaviour

    12
    0 評價
    12 貼文
    7k 瀏覽
    G
    For Qt itself that's configured at compile time with the -rtti switch. For your projects, you can add rtti do CONFIG: @ CONFIG += rtti @
  • SQLite database with Qt

    2
    0 評價
    2 貼文
    3k 瀏覽
    G
    To cite "QSqlQuery::size() ":http://doc.qt.nokia.com/4.7/qsqlquery.html#size: bq. Returns the size of the result (number of rows returned), or -1 if the size cannot be determined or if the database does not support reporting information about query sizes. [Emphasis by me] SQLite does not support reporting the number of rows in the result set.
  • Understanding QComboBox signals

    10
    0 評價
    10 貼文
    21k 瀏覽
    G
    I'm not sure if an editable combobox is the right approach for this... It usually is for selecting preexisting entities (a read-only combobox) or for giving some reasonable default values to choose of for a free text field. If you type on the text of an existing entry, that entry is not changed, but a new entry for the combobox is created. I'm not sure if it's possible at all to make the combo box work as you want.
  • Exact page layout with rich text

    2
    0 評價
    2 貼文
    2k 瀏覽
    G
    HTML (on which the [[Doc:QTextDocument]] based classes rely on) are very hard to make pixel precise - if not impossible. In that case I personally would go with a QPainter and draw the contents directly. That way you have exact control over where your data is printed.
  • [Solved] QFileSystemModel root path

    5
    0 評價
    5 貼文
    9k 瀏覽
    A
    As stated above and in the docs: [quote]QFileSystemModel will not fetch any files or directories until setRootPath is called. This will prevent any unnecessary querying on the file system until that point such as listing the drives on Windows.[/quote] As for starting off at a certain node, would setRootIndex do the trick? You can retreive the index to use as root by using QFileSystemModels methods to get a QModelIndex for a path.
  • QFont - retrieve font's file name

    1
    0 評價
    1 貼文
    4k 瀏覽
    尚無回覆
  • [Solved] QWidget assumes allocation on heap, not stack?

    11
    0 評價
    11 貼文
    8k 瀏覽
    G
    [quote author="RickH" date="1313418131"] The way C++ is set up, the destructor for the object-as-a-whole is called before the destructors for the objects-who-are-members. So I have to not set the parent of the member to be the object-as-a-whole. If I do, the object-as-a-whole will call delete on the member. [/quote] Yes, that's correct. And the destructor fthe object-as-a-whole will be ran before the destructors of the members. If you need parent-child relationship in this use case, use a pointer and new instead of an object variable.
  • [SOLVED] Adding horizontal scroll bar to a QSplitter

    3
    0 評價
    3 貼文
    4k 瀏覽
    M
    Thanks Volker... Its working now , After using the setMinimumSize(hint) function . But not with the QSplitter::setChildrenCollapsible(false) Thanks for your valuable inputs..
  • Can I create a translucent window

    4
    0 評價
    4 貼文
    3k 瀏覽
    M
    mouse and keyboard events pass through my window Qt::WA_TransparentForMouseEvents or QWidget::setMask() -> you need to calculate region of MyWindow which can be painted and pass that to setMask function.
  • Avi into a stage.

    4
    0 評價
    4 貼文
    2k 瀏覽
    G
    If you look at the Qt docs, you find many examples, e.g. the "Multimedia examples.":http://doc.qt.nokia.com/4.7/examples-multimedia.html have a look there.
  • Getting an excel file

    8
    0 評價
    8 貼文
    7k 瀏覽
    K
    thanks alot
  • [SOLVED] convert a string to a variable and visa versa

    7
    0 評價
    7 貼文
    3k 瀏覽
    K
    thank you.
  • Minimum size of static-linked Qt GUI app?

    8
    0 評價
    8 貼文
    9k 瀏覽
    L
    I "think" they are release libs because I configured with release option on. And I'm talking about static lib, 2MB QtCore and 8MB QtGUI seems unbelievable to me... Anyway, what I'm caring about is the size of the final static-linked app.
  • Minimizing Application to Tray

    25
    0 評價
    25 貼文
    39k 瀏覽
    R
    Yep, that's why I gave the second block of code (which I've just realised had the processEvents() call still in it - it wasn't meant to be there)
  • MIDI callbackhook implementation

    2
    0 評價
    2 貼文
    2k 瀏覽
    F
    Depends on the work done in the callback. Usually the callback function is executed in the library's thread, which may be your main thread. If you need to feed back information into your application, it's probably a good idea to read "Threads, Events & QOjects":https://developer.qt.nokia.com/wiki/Threads_Events_QObjects for more information on how to pass event callbacks into the event loop.
  • Draw a Line in a Text Label

    5
    0 評價
    5 貼文
    4k 瀏覽
    G
    You could use the "text frame feature of a QTextDocument":http://doc.qt.nokia.com/4.7/richtext-cursor.html#frames which can have a border and check, how it looks like in the RTF format.
  • [SOLVED] Problem compiling with Qt Creator

    4
    0 評價
    4 貼文
    6k 瀏覽
    Z
    Ah okay, I see my mistake, @ //Wrong QFuture<void> future = QtConcurrent::run(concurrentFunction(&timer)); //Right QFuture<void> future = QtConcurrent::run(concurrentFunction, &timer); @ Thanks for your help!