Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Tutorial for Qt designer

    2
    0 Votes
    2 Posts
    2k Views
    F
    "This":http://doc.qt.nokia.com/2.3/designer/part1index.html is quite old. "This":http://doc.qt.nokia.com/stable/designer-manual.html is the latest one. Search also on youtube.
  • Problem getting with setGeometry function?

    6
    0 Votes
    6 Posts
    3k Views
    A
    You can put a QMdiArea on a QMainWindow as it's central widget.
  • [SOLVED]Weird regex behavior...

    4
    0 Votes
    4 Posts
    2k Views
    W
    Ahh... Got it. Thanks.
  • Model value persist in QCombobox after loosing focus

    6
    0 Votes
    6 Posts
    3k Views
    J
    Well, I already tried to change the "No" to "No " in the QStringList. Problem is, the mapper wont work on that particular field. Thanks anyway, for now I did make a table containing only a "Yes" and a "No" it is an additional count to the number of tables but it does work perfectly. ;D
  • Change form style!

    4
    0 Votes
    4 Posts
    3k Views
    A
    oh.i don't know it(for mac style) thanks about reference
  • Suggestions for populating ListView in a Slide based menu UI

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Internal directory

    19
    0 Votes
    19 Posts
    7k Views
    G
    [quote author="Andre" date="1323721023"]Well, as you only need a single file (or just a few files, right?), you can probably just use [[doc:QTemporaryFile]].[/quote] Unfortunately, QTemporaryFile has a valid path name only as long as it's open. As soon as you close it, the path name is reset/invalid. I had problems using that together with an external library that takes const char pointers for file paths too (GraphicsMagick in that case).
  • Qt Mac OS X and OpenGL showing garbage display

    4
    0 Votes
    4 Posts
    3k Views
    B
    I should add, the Qt example codes all seem to work fine.
  • 0 Votes
    4 Posts
    2k Views
    EddyE
    It's not an answer to your question, but did you know Adobe is a Qt customer? At least for some "tools":http://qt.nokia.com/qt-in-use/story/app/adobe-photoshop-album/.
  • 0 Votes
    5 Posts
    3k Views
    T
    Thanks for replying! Yeah, about the seek thing: I thought that was probably the case. This is only for a University assignment, so it isn't terribly serious. I know what a circular buffer is but I can't quite see how that would help - being dense unfortunately. Could you explain that a little more please? :(
  • QXmlSchemaValidator trouble with size of xml input.

    2
    0 Votes
    2 Posts
    3k Views
    T
    I have the same problem when trying to validate() the xml for my app. 100 card elements is the limit. After that the validate() method returns with "Element card is not defined in this scope." In the schema I have minOccurs="8" and maxOccurs="2048" for the card element. If I set maxOccurs to 100 or less then it works fine for occurences <= 100 card elements. If I set maxOccurs to unbounded then it works fine for any number of card elements. So in my case the solution is to set maxOccurs to unbounded and move the limiting of the number of card elements to the application logic. Tim Reilly
  • Controlling execution of program/sub windows using button

    3
    0 Votes
    3 Posts
    2k Views
    B
    "Segmentation Fault" is always a memory problem, you have referenced to a nonexistent variable in this case. So create your SessionWindow on the heap.
  • [Moved] &quot;exited with code 0&quot; error

    21
    0 Votes
    21 Posts
    10k Views
    G
    Moved to the General forum, this seems to be the least inappropriate one for this.
  • QRegExp: Match double-quoted text

    4
    0 Votes
    4 Posts
    3k Views
    F
    [quote author="rapidcc" date="1323702626"] I'm a bit confused because I had used this very regex earlier and it didnt work. However, it works perfectly now. [/quote] Please consider that there are slightly differences between regexp engine implementations. That is why most of such implementation are becoming more and more perl-compatible. In your particular case there was a problem with the atom, that was not indicated.
  • [Solved] Precision and converting float variables into strings

    3
    0 Votes
    3 Posts
    22k Views
    A
    Calculate the magitude of your number, and adjust the value of precision accordingly. The maginitude here is a basically the value of n in 10^n, like you use for scientific notation. In your examples, that would be 1, 2 and 0 repectively: the largest value of n where the result of 10^n is smaller than the number you working with. In your case, it seems you want to precision to be n+2. There are several ways to calculate the magnitude. Mathematically, it is simply 10Log(x), but depending on the range you are interested in and the performance you need, a simple loop dividing by 10 or even a big if/else if construct or something like that may be enough for your needs.
  • QThread: am I doing it wrong?

    15
    0 Votes
    15 Posts
    8k Views
    J
    Ok maybe I failed in trying to express what I was looking for. Sorry about that, I tried my best but it wasn't enough. Thanks for your patience guys.
  • how we can access data of one project within other project?

    24
    0 Votes
    24 Posts
    9k Views
    R
    The project to be imported is in a folder named 'a spaced folder'. main.cpp @#include <QtGui/QApplication> #include "mainwindow.h" #include "../a spaced folder/test2/mainwindow1.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; MainWindow1 w1; w.show(); w1.show(); w1.setWindowTitle("this is imported"); return a.exec(); }@ Header @ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QtGui/QMainWindow> class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = 0); ~MainWindow(){} }; #endif // MAINWINDOW_H @ source @#include "mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { } @ @QT += core gui TARGET = test TEMPLATE = app SOURCES += main.cpp mainwindow.cpp "../a spaced folder/test2/mainwindow1.cpp" HEADERS += mainwindow.h "../a spaced folder/test2/mainwindow1.h"@ Project to be imported. pro @ QT += core gui TARGET = test2 TEMPLATE = app SOURCES += main.cpp mainwindow1.cpp HEADERS += mainwindow1.h@ header @#ifndef MAINWINDOW1_H #define MAINWINDOW1_H #include <QtGui/QMainWindow> class MainWindow1 : public QMainWindow { Q_OBJECT public: MainWindow1(QWidget *parent = 0); ~MainWindow1(); }; #endif // MAINWINDOW1_H@ Source @#include "mainwindow1.h" MainWindow1::MainWindow1(QWidget *parent) : QMainWindow(parent) { } MainWindow1::~MainWindow1() { } @ main.cpp @#include <QtGui/QApplication> #include "mainwindow1.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow1 w; w.show(); return a.exec&#40;&#41;; }@
  • QSystemTrayIcon and Context menu

    7
    0 Votes
    7 Posts
    3k Views
    T
    Its the context menu, which open up correctly on right click. It works as it should except the case I described above.
  • QSystemTrayIcon and relative path

    6
    0 Votes
    6 Posts
    3k Views
    R
    The easiest way must be using the [[doc:resources]]
  • ComboBox filled using a model

    3
    0 Votes
    3 Posts
    2k Views
    F
    You can get the "current index ":http://doc.qt.nokia.com/latest/qcombobox.html#currentIndex-propand then extract the index from your model. Or use currentText and do something similar.