Skip to content

Brainstorm

Stuck? Some ideas just need to be dumped on someone before they can materialize.
449 Topics 3.2k Posts
QtWS25 Last Chance
  • Exposing third-party API to QtScript

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    10 Posts
    7k Views
    S

    code works if I comment call of DrawThemeTextEx
    It draws
    may be need to set clipping before call it?

    OMG!

    @typedef HRESULT (*PDrawThemeTextEx)(
    HTHEME hTheme,
    HDC hdc,
    int iPartId,
    int iStateId,
    LPCWSTR pszText,
    int iCharCount,
    DWORD dwFlags,
    LPRECT pRect,
    const DTTOPTS *pOptions
    );@

    I forget typedef WINAPI
    Should be
    @HRESULT (WINAPI *PDrawThemeTextEx)(
    HTHEME hTheme,
    HDC hdc,
    int iPartId,
    int iStateId,
    LPCWSTR pszText,
    int iCharCount,
    DWORD dwFlags,
    LPRECT pRect,
    const DTTOPTS *pOptions
    );@

    All works!!! Thanks all

    PS. never ever copy-paste function declaration from MSDN!!!

  • [Moved] CSV File to XML File

    9
    0 Votes
    9 Posts
    7k Views
    G

    I moved this thread to the brainstorm forum, as it's only marginally Qt related.

  • [Moved] Help needed for SQL query

    10
    0 Votes
    10 Posts
    4k Views
    A

    [quote author="loladiro" date="1309941231"]Or something like this
    @SELECT a FROM (SELECT a, COUNT(DISTINCT b) as c a_b WHERE b IN(1,4) GROUP BY a HAVING c=2)@[/quote]

    Good, that's what I want.

  • [SOLVED] Generating a UI on the fly, Pt.2

    18
    0 Votes
    18 Posts
    7k Views
    V

    Thanks Andre. I think I know how I'll go about and design this.

  • 0 Votes
    11 Posts
    4k Views
    J

    If one is trying a use a class and looks at the documentation, it is quite obvious. I also understand that Qt documentation provides a list of "obsolete classes":http://doc.qt.nokia.com/4.7/obsoleteclasses.html each version. But unless you're constantly looking to keep the code up-to-date, you might not keep track of it. I usually compile the new version.. fire up assistant and continue working on the client's requirements. Maybe, it would be good to make that page more prominent and have a more in-your-face-visibility web page for it here on devnet. But then again, i don't see too many classes on the list. Anyhoo...

  • 0 Votes
    5 Posts
    2k Views
    S

    Damnit, curiosity killed the cat again....

  • [SOLVED] Generating a UI on the fly

    20
    0 Votes
    20 Posts
    9k Views
    V

    Of course. I can post a screenshot as soon as I have something interesting.

  • 0 Votes
    6 Posts
    6k Views
    A

    I think maintainability is more important than you avoiding an if statement. It is hard to understand what piece of data is where if you use an array to store them. That may lead to bugs in Qt in the future. So please, don't.

    Adding a convenience function that implements operator is fine by me, but the implementation would basically look like FrankZ's proposal.

    I am not sure if adding a size to a point should yield another point, but perhaps it should. That would be easy to implement. You might want to supply a merge request containing the patch and a use case and/or other argumentation why this is needed.

  • Qt custom input method?

    2
    0 Votes
    2 Posts
    3k Views
    M

    Take a look at QInputContext, that's the plugin API you can use for your input method.

  • Cross platform IPC

    5
    0 Votes
    5 Posts
    7k Views
    Z

    You could use vortex http://www.aspl.es/vortex/doc.html its a BEEP Core protocol mapped into TCP/IP layer

    Some of its features are:

    Robust and well tested BEEP implementation with a threaded design (non-blocking parallel comunications), written in ANSI C.
    Context based API design making the library stateless. Support to run several ejecution contexts in the same process.
    A complete XML-RPC over BEEP RFC 3529 with a IDL/XDL protocol compiler (xml-rpc-gen).
    A complete TUNNEL (RFC3620) support.
    Complete implementation for TLS and SASL profiles.
    Modular design which allows to use only those components needed.
    Support to proxy BEEP connections through HTTP proxy servers.
    Support for single threaded (no async notification) programming.

    They even have a Javascript BEEP implementation.

    If you don't know what BEEP is.
    http://en.wikipedia.org/wiki/BEEP

    BEEP (Blocks Extensible Exchange Protocol) is a framework for creating network application protocols. It includes an application protocol kernel for connection-oriented asynchronous interactions, and can be used both for binary and text messages within the context of a single application user identity.[1]
    BEEP is intended to abstract-out the common features that have traditionally been duplicated in each protocol implementation. BEEP (formerly called BXXP) typically runs on top of TCP and allows the exchange of messages called 'frames'. Unlike HTTP (and similar protocols), either end of the connection can send a frame at any time, and 'questions' and 'replies' can be interleaved easily. BEEP also includes facilities for encryption and authentication, and is highly extensible.
    BEEP was designed by Marshall Rose, who also worked on the POP3, SMTP, and SNMP protocols.[2

    It works on Windows, Mac, Linux

  • Original QMessageBox

    6
    0 Votes
    6 Posts
    3k Views
    A

    That's the whole point. You should try to avoid forbidding the user to do something just because it is convenient for you as a programmer. Instead, make actions undoable, for instance.

    Always keep in mind, that your user is trying to achieve something with your program. Your program is a tool, nothing more. That tool should support whatever the user is trying to do, and not hinder him in his way to do that. Popup boxes disrupt the flow of work, and of thought and focus of the user. They can also scare the user if you start giving warnings they may have trouble to comprehend. That hinders him in his task.

    So, rather than spending time on fancy graphics effects that are really the task of the window manager to handle anyway, I would suggest rather to spend your energy on making sure the user gets done what he want to get done without being bothered or scared by your application with such dialogs.

  • 0 Votes
    5 Posts
    2k Views
    A

    I am sorry, I am not deep enough into the issue to give you any advice on the actual contents on this discussion.

  • CanRead() and read()

    14
    0 Votes
    14 Posts
    6k Views
    D

    Looks like what is needed for OP is QTextStream::operator>>(). It reads one word from QIODevice (where words are separeted with QChar::isSpace() chars).

  • Find index of QVector by comparing an item

    12
    0 Votes
    12 Posts
    14k Views
    Y

    QMap is perfect solution in this case.

    I'm little late .... :)

    Thanks guy!

  • Idea for Gutenberg Qt based mobile reader

    22
    0 Votes
    22 Posts
    13k Views
    S

    I'd been toying with this idea for a while, but the number of formats, and my (in)competence, had also put me off. One idea I had was to use Qt Plugins for the different formats, but that leads me to the following questions: Does Qt on Symbian support plugins (I assume it does), and also can plugins be bundled on the Ovi store as additions to existing apps?

  • 0 Votes
    10 Posts
    4k Views
    A

    [quote author="stuk" date="1305300505"]What title is this?!?!?![/quote]

    I modified the title a bit to make it somewhat shorter and easier to read.

    Edit:
    Also moved forum, as this is actually a bit off topic seeing that the SDK crash is more probably the result of the RAID failure than the cause of it...

  • Code critique request

    8
    0 Votes
    8 Posts
    4k Views
    R

    Being new to Qt and having forgotten 90% of my C++ I went with the path of least resistance at the moment regarding the models :)

    I will probably have to change something later but for the moment it is working for me.

    I have just about finished reorganising the files if anyone wants to comment.

  • Apple release XCode 4 with LLVM

    4
    0 Votes
    4 Posts
    6k Views
    S

    So far it seems to be working for me; I've got xcode4 installed from the app store. I did have to re-install qt creator. I think qt creator is actually using gcc still; but I can try out xcode4 and still work with qt creator and build and run things there, so I'm happy for now.

    I would really like to see official xcode4 support though :)

  • [Solved]Forbidden Declaration...

    4
    0 Votes
    4 Posts
    3k Views
    G

    Hi rosh1985,

    as your problem is solved, please mark this thread as solved:
    click on your first posts' edit link, change the title and add [Solved] in the beginning, so everybody knows, it's done.

    Thanks.