Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • Unicode problem

    4
    0 Votes
    4 Posts
    2k Views
    A
    tnx
  • Harmattan screen at start of app

    3
    0 Votes
    3 Posts
    2k Views
    V
    Your a life saver Zlatomir, thanks.
  • QLibrary - resolve a char*

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    3k Views
    M
    I don't understand your question, may be you want to use "itemAt()":http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#itemAt or "itemAt()":http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#itemAt-3 at "QGraphicsScene::MousePressEvent":http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#mousePressEvent. Note that you must pass "scenePos()":http://qt-project.org/doc/qt-4.8/qgraphicsscenemouseevent.html#scenePos to itemAt() as parameter.
  • QStateMachine and SCXML

    3
    0 Votes
    3 Posts
    2k Views
    M
    Hi, Eric, welcome to Devnet! Please be sure to wrap your code snippets in @ tags for formatting. Also, please open new threads for additional topics/questions. Thanks, and welcome again!
  • MousePressEvent

    2
    0 Votes
    2 Posts
    3k Views
    N
    Well have a list of points variable in your scene most likely. @QList<QPoint> clicked_points_;@ and in your QGraphicsScene derive "mousePressEvent":http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#mousePressEvent in it check the functions argument for button() to see which button is pressed If left button append the "button down in screen pos":http://qt-project.org/doc/qt-4.8/qgraphicsscenemouseevent.html#buttonDownScreenPos to clicked_points_ or if right button display clicked_points_ values and clear list after that if needed if you want to "return on right click" have a signal to emit clicked_points_, catch that in a slot and you'd be done.
  • 0 Votes
    3 Posts
    7k Views
    D
    Hi, Here is how I resolved the problem: @ QRegExp [removed]"^CREATE.(TABLE |TABLE IF NOT EXISTS |VIEW |DATABASE |PROCEDURE |FUNCTION |TRIGGER |EVENT ).[A-Za-z_\\d%]*\.{0,1}[A-Za-z_\\d%]*{0,1}"); expression.indexIn(line); QRegExp expression2("[A-Za-z_\\d%]*\.[A-Za-z_\\d%]*"); expression2.indexIn(line); symbolName = expression2.capturedTexts().at(0); if (symbolName.isEmpty()) { QRegExp expression3("[A-Za-z_\\d%]*"); expression3.indexIn(line); symbolName = expression3.capturedTexts().at(0); } symbolName = symbolName.replace("`", ""); symbolsLineNumber.insert(symbolName, counter); listSymbols->addItem(new QListWidgetItem(QIcon(icon), symbolName)); @
  • Html to PDF converter for QT documentation.

    2
    0 Votes
    2 Posts
    4k Views
    M
    I haven't tried it myself, but you might be able to run "Doxygen":http://www.stack.nl/~dimitri/doxygen/ against the Qt source tree to generate PDF docs. Of course, there may be something much easier, too.
  • Zoom - what is the best way to do this?

    11
    0 Votes
    11 Posts
    4k Views
    D
    Never mind - I was being dim, my view was going out of scope.
  • QNetworkAccessManager and xml reply

    9
    0 Votes
    9 Posts
    5k Views
    N
    Sorry for so dealyed reply , actually I was busy :P . Anyways the error which I am getting is :QNetworkReply::SslHandshakeFailedError which has error code as 6 .
  • Building a Qt dll

    4
    0 Votes
    4 Posts
    7k Views
    R
    "Here":http://doc-snapshot.qt-project.org/4.8/sharedlibrary.html.
  • [SOLVED]QRegExp is too greedy...

    6
    0 Votes
    6 Posts
    3k Views
    JohanSoloJ
    I would rather write (don't know whether it works though): QRegExp regx("&lt;iframe .*src=\"(.+?)(\".*&gt;&lt;/iframe>)"); Note the + instead of your *. + stands for at least one character and maybe more, whilst * stands for zero or one character. [quote author="ThaRez" date="1340956318"]I also tried: @QRegExp regx("<iframe .src="(.?)(".></iframe>)"); QRegExp regx("<iframe .src="(.?)(".></iframe>)");@ But neither matched anything... Any further suggestions? Thanks! -RS [/quote]
  • QtScript and prototypes

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [SOLVED] QTreeView over QWidget

    3
    0 Votes
    3 Posts
    2k Views
    T
    [quote author="Andre" date="1340915142"]Just create it without a parent, and position it manually. That will take care of the displaying part. Making it work like a popup requires some more work. [/quote] Andre, thanks for the really fast reply. I haven't ever thought that it can be done in this way. Thanks. Solved.
  • HTML5 Application and you files (HTML, JS and other)

    2
    0 Votes
    2 Posts
    2k Views
    T
    I believe it will be packed into your application.
  • Did someone use Qt QML on devices with resistive touch ?

    12
    0 Votes
    12 Posts
    4k Views
    P
    On my nokia n900 with resistive touchscreen and the app was also tested on a resistive nokia 5230 as well as several capacitive android phones without having to modify anything at all.
  • Opinion for Desktop Application

    4
    0 Votes
    4 Posts
    2k Views
    A
    Qt is an object oriented, event driven framework. You should have little problems getting into it when you have a reasonable background in C++. However, as this is a Qt community, don't expect unbiased advice here on if this is the framework for you or not. That depends on many more factors than what you're telling us.
  • QList Exception/Crash After Only Change of Compiler

    2
    0 Votes
    2 Posts
    1k Views
    A
    No, it is not a known issue with Creator. The fact of the matter is, that there are differences between the compiler. Most often, it happens that code is wrong but still works on one compiler (perhaps with some set of flags only), but will not work on another compiler or with another set of flags. However, assume that the root issue in your own code. Qt itself has been quite well tested with both compilers.
  • Model/View How to handle where my custom ItemDelegate is displayed ?

    2
    0 Votes
    2 Posts
    1k Views
    A
    No, that is up to the view. The view will set the geometry of the editor widget to match that of the cell.
  • C++ project use qml via qrc and doesn't work

    7
    0 Votes
    7 Posts
    3k Views
    M
    One way to prevent that from happening again is adding @ Q_ASSERT(QFile(<resource path>).exists()); @ before setting the URL source. Just make sure to use the same path later :-)