Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Regarding QDomDocument

    3
    0 Votes
    3 Posts
    2k Views
    G
    @ QDomDocument doc("QDNTest"); QDomProcessingInstruction xmlVers = doc.createProcessingInstruction("xml", "version="1.0" "); doc.appendChild(xmlVers); QDomElement root = doc.createElement("QDNTest"); doc.appendChild(root); qDebug() << doc.toString(); @ This creates output @ <?xml version="1.0" ?> <!DOCTYPE QDNTest> <QDNTest/> @ To strip the DOCTYPE from the XML, construct the document without argument: @ QDomDocument doc; QDomProcessingInstruction xmlVers = doc.createProcessingInstruction("xml", "version="1.0" "); doc.appendChild(xmlVers); QDomElement root = doc.createElement("QDNTest"); doc.appendChild(root); qDebug() << doc.toString(); @ This creates output @ <?xml version="1.0" ?> <QDNTest/> @
  • How do I address individual elements in an SVG file?

    4
    0 Votes
    4 Posts
    4k Views
    I
    Not solved as such, but just to wrap up this thread, I've found an alternative way of doing what I want. If I dispense with the QGraphicsView and just use a QSvgWidget, storing the image in a QByteArray, I can manipulate the SVG elements in memory and just reload the data into the widget. It's actually a simpler way of achieving the samer result, though the speed of rendering seems even slower.
  • Qbytearray printing out the values between 0 and 255

    5
    0 Votes
    5 Posts
    4k Views
    K
    I am not sure if you really want to go through a qbytearray. You can manipulate the images directly as it was suggested in "your other post":http://developer.qt.nokia.com/forums/viewthread/14323/
  • Memory is not releasing even aftr closing the tab of QTabWidget!!??

    9
    0 Votes
    9 Posts
    7k Views
    L
    [quote author="aurora" date="1329208881"] code in adding tab @ ui->tabWidget_unfiltered->addTab(filesTable,FileName); @ and for closing tab @ QWidget *tab=ui->tabWidget_unfiltered->widget(index); ui->tabWidget_unfiltered->removeTab(index); delete tab; // <-- @ [/quote] The widget is deleted correctly. Again, a non-shrinking working set does not prove a memory leak by any means. Your system library may or may not return the memory on delete, the operating system may or may not leave unused pages in the working set. If you think you might have a memory leak use a dedicated tool, like valgrind, Purify or Visual Studio to detect the leak, not the Windows task manager (or any other similar tool, like top). The source of your "memory leak" is the use of an improper tool to detect it.
  • 0 Votes
    6 Posts
    2k Views
    A
    ok thank u...
  • Qt: Session management error: Could not open network socket

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • List is expanding and hiding everything else!!

    3
    0 Votes
    3 Posts
    2k Views
    G
    you can try to set the "sizePolicy":/doc/qt-4.8/qwidget.html#sizePolicy-prop and/or the horizontal/vertical stretch on the widget. The "layout management":/doc/qt-4.8/layout.html docs have the details.
  • Reading MediaDataStream by HTTP

    3
    0 Votes
    3 Posts
    2k Views
    M
    Yes, my program wil be one of the sub system of huge software product, which developing was started long time earlier when Qt 3 was the latest version. And now it is impossible to re-develop this project to newer version of Qt.
  • QDateTime and Time Zones

    3
    0 Votes
    3 Posts
    3k Views
    W
    Unfortunately, we are running on Windows...I guess I could just tell users to change their time zone to somewhere without DST ;) I wonder how that would fly!
  • Another "change qt application language at runtime" thread.

    50
    0 Votes
    50 Posts
    34k Views
    K
    I don't think you need implement a Template Class and inherit all of its classes. Just override the changeEvent(QEvent* event) function on widgets from your View Layer, like that: @void MyWidget::changeEvent(QEvent* event){ if (event->type() == QEvent::LanguageChange) { widget.retranslateUi(this); } QWidget::changeEvent(event); }@ I hope that helped.
  • Segmentation fault when allocating widgets

    5
    0 Votes
    5 Posts
    3k Views
    M
    Be sure and tag your post as [Solved]. Thanks!
  • How can we handle large files in qt?

    9
    0 Votes
    9 Posts
    7k Views
    deisikD
    [quote author="aurora" date="1329131080"]I am reading line by line and displaying them in QTableWidget but as the file size increases, program crashes or hangs….what should i do, in this case? How can i load such big files in QTableWidget?[/quote] No way. Possibly you could try QTableView but your mileage may vary [quote author="aurora" date="1329131080"]How can i perform searching efficiently on them?[/quote] You should build something like a binary search tree on the data [quote author="aurora" date="1329131080"]Does Qt provides any good mechanism for these kind of problems? [/quote] The cruel answer is no, qt won't help you in any of these problems. You should rely only on your sheer C/C++ skills in such questions if you want to create something workable. In short, you will have to write your own file engine or use an existing one to work directly off disk (relational DBMS won't help you either). And probably you will have to exclude qt from everything that deals with large datasets. For sure somebody will get up here and point a finger at me but before blowing fire read "this":http://bugreports.qt-project.org/browse/QTBUG-18490
  • Guide for form creation in Qt creator and to store values in SQLite

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    M
    I would start with the excellent "tutorials":http://developer.qt.nokia.com/doc/qt-4.8/tutorials.html and "examples":http://developer.qt.nokia.com/doc/qt-4.8/all-examples.html included with Qt. There are also many resources available such as "videos,":http://developer.qt.nokia.com/videos the online "documentation,":http://developer.qt.nokia.com/doc/qt-4.8/ the "wiki":http://developer.qt.nokia.com/wiki/ and previous forum posts. In asking for step-by-step directions to solve your specific problem, you're essentially asking someone to write your application for you. If you look in the above areas, you can find all the pieces you need to put together your project on your own. [Edit: I see that you have already asked this question "here":http://developer.qt.nokia.com/forums/viewthread/14455/ as well. Please don't double-post. Closing this thread.]
  • Qt OpenGL background transparency

    3
    0 Votes
    3 Posts
    9k Views
    N
    One thing I can add here: You need to: setAttribute(Qt::WA_TranslucentBackground); on both the Viewport (QGLWidget) AND the QGraphicsView On my linux machine with a compositing manger running I can have opengl-painted qml applications with "holes" :) Now I add a questions: This is not working on windows (with running aero) ... anyone an idea why?
  • Connect 4 sliders together

    17
    0 Votes
    17 Posts
    8k Views
    ?
    You are welcome, I hope I didn't misinform you by accident, I myself am fairly new to programming.
  • [Solved] setToolTip(QString()) leaves previous tooltip visible

    4
    0 Votes
    4 Posts
    5k Views
    A
    Sorry, I misunderstood your posting at first. Manually calling QTooltip::hideText() does what I need. Thanks!
  • ARM problem: Qt::Window Qt::Widget showFullscreen() showNormal()

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • 0 Votes
    11 Posts
    24k Views
    A
    The Windows UI styleguide, to name just one, disagrees. The Enter key is "supposed":http://msdn.microsoft.com/en-us/library/ms971323.aspx#atg_keyboardshortcuts_fundamentals_of_keyboard_ui_design to trigger the default action of a dialog. I'm sure similar rules apply to OS-X, KDE and Gnome. You may think it is a bad idea, but I think it is a bad idea to break UI standards. And the standard is to trigger to default action.
  • 0 Votes
    8 Posts
    3k Views
    A
    [quote author="yashaswiram" date="1329306420"]plz can i get codes in pyqt4 ....[/quote] No. I'm not going to re-implement the code I pointed you to in Python just to make you happy.
  • Painting the mouse trace with QGraphicsItem

    2
    0 Votes
    2 Posts
    2k Views
    J
    Did you take a look at the Finger Paint example? You only replace QTouchEvent with QMouseEvent. Regards, Jake