Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • QtCreator part 3 tutorial

    3
    0 Votes
    3 Posts
    2k Views
    D
    I guess it is assumed the very basics of C++ are known, in this case how forward-declaration works and what it's good for. If you're new to (C++)programming, I tend to discourage starting with Qt right away. While Qt is a great role model for clean programming/naming/API design (I myself have learned a lot from the Qt wizards), it uses some quite tricky mechanisms that are way over the head of new programmers, and may distract from actually learning C++ (Meta object RTTI/MOC, qmake, Signals&Slots, pimpl, the whole event loop system, the different ways of memory management). The STL is more down to earth regarding those things. And as a bonus, after learning to walk with C++ and STL a little, you'll appreciate Qt much more and feel like flying.
  • Setting Header Data with QSqlQueryModel does not work

    2
    0 Votes
    2 Posts
    3k Views
    D
    Make a QAbstractProxyModel or QSortFilterProxyModel which only reimplements headerData() to return the header strings you want. All other stuff shall be forwarded (QSortFilterProxyModel already does the forwarding for you. Just disable the filtering by reimplementing acceptsRow/Column to always return true). //EDIT: Oh yes, and then use the proxy model between the model and the view with setSourceModel ;). If you want to tie the proxy model to the view, you can of course integrate the proxy model into the view and reimplement the setModel method of your view to call setSourceModel on the internal proxy, and then call the base class setModel function with the proxy as parameter.
  • Metro Ui using c++

    3
    0 Votes
    3 Posts
    4k Views
    L
    There is a public Nokia project about "Qt on Metro UI":http://projects.developer.nokia.com/qt_metro
  • How to use QTreeView::setRowHidden

    3
    0 Votes
    3 Posts
    4k Views
    O
    Han ok thanks, i try !
  • 0 Votes
    4 Posts
    11k Views
    K
    You might want to have a look to "this response":http://qt-project.org/forums/viewthread/16132/#85414 to a similar post. That might cure your problem.
  • QDomNode.setContent() doesn't work...

    2
    0 Votes
    2 Posts
    1k Views
    L
    You could try appending QIODevice::Text to your open mode flags; you might be running into line ending issues on Windows. Another option would be passing the optional parameters to setContent() required for reading the parse error and taking a look at it.
  • Qt Quick programs for Desktop?

    11
    0 Votes
    11 Posts
    6k Views
    L
    I don't think that user interfaces should evolve in they way they look like, but they should evolve in the way they actually work, they way information is structured and presented to the user. It is the feel that has to change, not (so much) the look. When I talk about interface guidelines I do not only mean the color and shape of buttons, when to use and when to not use animations or the margin and padding of elements - but much more how we've been trained to actually structure our applications and the workflow. We have learned to use (both when creating and consuming applications) a very narrow set of widgets and workflows which became an artifical limitation to the usability. The video I've linked is quite a good example. Our world is full of non-standardized, task-centric, but yet very easy to consume user interfaces. Think of vending or ticket machines, cash dispenser or professional group-specfic interfaces, like medical devices, design software or industrial machinery. Most applications are created to cater a specific task and they deserve a specific interface. As you correctly said, one size doesn't fit all. I think the visual appearance and the appeal of applications is another important, yet neglected aspect. Humans are visual creatures, whose brain is trained to perceive and associate information. That's the reason we still use whiteboards, mindmaps and paper to be creative, because the typical application is just flat. It presents us a bunch of information with no visual connection. We tend to group information types together (actions at the top, status at the bottom, additional infromation in dialogs), instead of the information itself. I also think that the "learning effect" argument is stressed way to much, for the simple fact that even a standard-conform application has to learned, a non-standard conform application is not automatically harder to learn (quite contrary to, when done correctly it will be much easier to learn) and that it is always better to have an application which is hard to learn and efficient to use instead of beeing easy to learn and inefficient to use. Yes, there is a huge potential to non-standard designs to be abused and good user interface design actually is rocket science, but there is also a huge potential in improved usability. Saying that every application has to conform to the standard and doing not so is actually an anti-pattern (and thus results in less valuable applications) is flat out wrong.
  • How to create File dialog with Tree view?

    3
    0 Votes
    3 Posts
    4k Views
    S
    Hi, If can look int "QDirModel":http://qt-project.org/doc/qt-4.8/qdirmodel.html#details and "QFileSystemModel":http://qt-project.org/doc/qt-4.8/qfilesystemmodel.html examples. But your question is still not clear what exactly is your requirement. If you have implemented some code then kindly provide it so that it will be more clear for us to understand . Regards Soumitra EDIT: Thanks for the code previously it was just displaying "KK"
  • The $top_srcdir variable

    9
    0 Votes
    9 Posts
    5k Views
    T
    Sorry, I do not understand what you want to do. Where did you find top_srcdir to be a preset output variable?
  • Not work QFtp::put()

    4
    0 Votes
    4 Posts
    2k Views
    K
    in the "detailed section":https://qt-project.org/doc/qt-4.8/qftp.html#details 2 paragraph it says: [quote]This class provides a direct interface to FTP that allows you to have more control over the requests. However, for new applications, it is recommended to use QNetworkAccessManager and QNetworkReply, as those classes possess a simpler, yet more powerful API. [/quote] AFAIK it is not implemented, but as the quote states, it is recommended to use QNetworkAccessManager anyhow. Furthermore, vsftpd is a Unix/Linux thing, so it might be never part of Qt when it cannot be used cross-platforms.
  • Custom Paint Device?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QList with multiple types

    6
    0 Votes
    6 Posts
    11k Views
    S
    @DerManu, Thanks for the clarification, I didn't tried with QPair yet. Your answer improved my knowledge base as well. Thanks a lot :)
  • Multi-level Tree indexes for Drag and Drop?

    2
    0 Votes
    2 Posts
    2k Views
    D
    Just to clarify: With model->selectionModel()->selectedIndexes() you get a QList<QModelIndex> of selected indexes. On the QModelIndex, you can call parent() to get the parent index and thus have a possibility to find the complete path up to the root index (in which case parent().isValid() returns false). isn't this what you need?
  • [Solved] Qt Python Question on layouts & expanding

    2
    0 Votes
    2 Posts
    3k Views
    N
    Code was correct. I just constructed my layout incorrectly. Thanks!! (Can close thread)
  • 0 Votes
    3 Posts
    3k Views
    T
    Thanks for your reply! ;)
  • [Solved] Qt - How to get parent of QTreeWidgetItem

    8
    0 Votes
    8 Posts
    23k Views
    D
    Are you sure this case isn't covered by what Andre said? I would expect parent() to simply return 0 on top level items (but I haven't checked that).
  • Layout Design

    24
    0 Votes
    24 Posts
    11k Views
    B
    Thank you elephanten. :D
  • [Solved] Problem with tr an ä,ü,ö

    8
    0 Votes
    8 Posts
    6k Views
    G
    thank you for your responses. I tried it with trUtf8 and it works fine.
  • Reliably save the state of a widget before it gets closed or destroyed()

    6
    0 Votes
    6 Posts
    3k Views
    D
    [quote author="jc-denton" date="1336657863"]Well it writes it's state into an XML file. So what if the file is does not exist anymore? Then I would just loose the state :([/quote] Yeah but how would that change if using any other close-triggered signal/event and not the destructor? After all, If the file doesn't exist anymore, recreate it, if the state of the widget is so important.
  • (Re-)store MainWindow - separatly QToolBar and QDockWidget

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied