Results 1 to 7 of 7

Thread: application design questions

  1. #1
    Join Date
    Aug 2006
    Location
    troy, new york
    Posts
    24
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default application design questions

    hi,
    i have some questions about classes i would like to use if possible. i don't use designer as i prefer to hand code projects. first are there touch screen libraries in qt 4.1, other than qtopia? excluding elotouch, there doesn't seem to be any manufacturer which supports X11, so i was hoping to find something that would free me from vendor specific code. second i'd like to add vertical tabs to the left side of the window like amarok, 2 will contain views of text files, the other both files docked. next, i need to display the files as read only, non editable and be able to increase/decrease the font, no TextEdit (html maybe?). lastly, can anyone put me in contact with a theme/style howto or developer as i wish to create custom widgets for an application i'm building. i have been using the arthur widgets so far, and i have somewhat of an idea how to use the files in the image folder, but i'd like to create something original so i need some additional information. i have tried the web for resources, nothing relevant... right now the main answers i need are on the touch screen libraries,vertical tabs and text file handling. thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: application design questions

    First of all, please, don't ask multiple unrelated questions in one thread.

    Quote Originally Posted by nikita
    i'd like to add vertical tabs to the left side of the window like amarok,
    These tabs look like a custom widget (or a series of buttons in older versions). This might be a modified QListView or QTabBar, but the easiest way to find out is to look into Amarok sources.

    Quote Originally Posted by nikita
    i need to display the files as read only, non editable and be able to increase/decrease the font, no TextEdit (html maybe?).
    Try QTextEdit::setReadOnly() or QTextBrowser.

    Quote Originally Posted by nikita
    can anyone put me in contact with a theme/style howto or developer as i wish to create custom widgets for an application i'm building.
    So you need custom style or custom widgets? These are quite different things. Anyway more appropriate place for this question is our jobs section.
    Last edited by jacek; 26th August 2006 at 23:20.

  3. The following user says thank you to jacek for this useful post:

    nikita (27th August 2006)

  4. #3
    Join Date
    Aug 2006
    Location
    troy, new york
    Posts
    24
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: application design questions

    sorry about the poor forum etiquette, i usually go it alone... still, thanks i'll look at the material on QTextBrowser, and i take it you don't have a suggestion on the touch screen libraries? thanks again.

  5. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: application design questions

    Quote Originally Posted by nikita
    i don't use designer as i prefer to hand code projects.
    Designer is not stopping you from hand coding projects!

  6. #5
    Join Date
    Aug 2006
    Location
    troy, new york
    Posts
    24
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: application design questions

    i took a look at QTextBrowser and QTextEdit::setReadOnly, i think i can use both for different aspects. i've been screwing around with the styles example. i was pretty frustrated with the way it was drawing the .png i was using until i realized that it was to big and the gradient too large, so i cut it down to a sliver and got the effect i wanted. so now all i have to do is create some custom buttons<yippee!>, lose a day or two of sleep tearing apart the arthurstyle source files and i have my own style. oh, and brandybuck, it's just a preference i have; nothing stops me from coding anymore<or any less>.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: application design questions

    Quote Originally Posted by nikita
    i'd like to add vertical tabs to the left side of the window like amarok
    I've just noticed that similar tabs are in KDevelop, so it might be some KDE extension.

  8. #7
    Join Date
    Aug 2006
    Location
    troy, new york
    Posts
    24
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: application design questions

    hi jacek,
    i have a solution to the verticality issue. i did some further reading and came across setTabPosition <property?> in the documentation:

    from the QTabWidget Class Reference page:

    Member Type Documentation
    enum QTabWidget::TabPosition
    This enum type defines where QTabWidget draws the tab row

    at first i kept trying to pass TabPosition, then i looked at the compiler error after the 5th time and:

    tabdialog.cpp: In constructor `TabDialog::TabDialog(const QString&, QWidget*)':
    tabdialog.cpp:34: error: `TabPosition' is not a class or namespace
    tabdialog.cpp:34: error: no matching function for call to `QTabWidget::setTabPosition(TabDialog::TabPosition )'
    ../../include/QtGui/qtabwidget.h:91: note: candidates are: void QTabWidget::setTabPosition(QTabWidget::TabPosition )
    *** Error code 1


    realizing i'm an idiot and that TabPosition is an enum type i just rewrote the code and got it. here it is for anyone interested:

    tabWidget = new QTabWidget;
    tabWidget->setTabPosition(QTabWidget::West);
    <addTab and stuff after above>

    North is above, South is below, West is left, East is right. i assume you can do this with other stuff. now all i have to do is even up the tabs and draw them green. i think i'll read bruce eckel again, i'm getting sloppy. take care and thanks again.

    http://www.qtcentre.org/forum/attach...1&d=1156725225
    Attached Images Attached Images

Similar Threads

  1. Replies: 3
    Last Post: 8th December 2006, 18:51
  2. Gnome makes application crash
    By regix in forum Qt Programming
    Replies: 35
    Last Post: 18th August 2006, 19:44
  3. How to install my own application in QUnitTest
    By Artschi in forum Qt Programming
    Replies: 3
    Last Post: 18th July 2006, 16:05
  4. Replies: 5
    Last Post: 24th April 2006, 15:42
  5. Replies: 3
    Last Post: 31st March 2006, 18:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.