Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Making a window with Qt

    3
    0 Votes
    3 Posts
    1k Views
    T
    Hi, ~TND5! Welcome to Qt Developer Network! As DerMan explained - any Qt top-level widgets without parents displays with QFrame. So if you run this code: @ QWidget a; // a - without parent a.setGeometry(10,10,300,200); // x = 10, y = 10, width = 300, height = 200 a.show(); // show it @ It will show new window which will contain all that a contains. But if you run this code in MainWindow for e.g: @ QWidget a(this); // a - with parent a.show(); // show it @ It will display a in this widget.
  • Extend editablesqlmodel example to add data to database

    1
    0 Votes
    1 Posts
    819 Views
    No one has replied
  • Help with old example of Qt widgets embedded in OpenGL

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Strange problem about OpenGL drawing in a QGraphicsView.

    2
    0 Votes
    2 Posts
    2k Views
    S
    I revised the line to : glPolygonMode(GL_BACK, GL_LINE); the problem still exists, HHHOoooWWwwever, glPolygonMode(GL_FRONT, GL_LINE); sloved the problem and the two items come out to be as expected. Why?
  • QSslSocket Client + Server

    2
    0 Votes
    2 Posts
    6k Views
    G
    I have resolved it, client missed CA certificate so: @Socket->addCaCertificates("C:/SOURCE/Project/Qt/server.csr");@ added to client fixed my problem.
  • How can I cause a thread to timeout?

    11
    0 Votes
    11 Posts
    8k Views
    D
    @Lukas: Thank you for the links. I'm studying multithreading only to know its possibilities, and those links are just what I needed :-)
  • Qt encryption, QCA build error

    12
    0 Votes
    12 Posts
    8k Views
    D
    Well then a Hash is definetly the right thing and an encryption is definetly the wrong thing to use. Further one shouldn't make up own security/authorization protocols when not proficient in it. Your scheme looks like it's vulnerable to replay attacks (due to the determinism in "Server increments question"). Make your application work with the standard mechanisms in the field: https://en.wikipedia.org/wiki/Cryptographic_nonce https://en.wikipedia.org/wiki/Cryptographic_salt
  • Slot Declaration rare problem to resolve[SOLVED]

    3
    0 Votes
    3 Posts
    5k Views
    S
    bq. What happens when you don’t use the public slots notation, but Q_SLOTS? does qmake run successfully? --Thank you.The code after replacing public slots notation to Q_SLOTS compiled and run successfully.That is because of includes of QWT in the project I guess with high likelihood and having a reason. Solved.
  • 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]